«

»

Dec 08

Print this Post

Check Dataset for Value Function (isInDataset)

Check for a value is in a specific column of a dataset.

function inDataSet(thisDataSet,thisField,thisValue)
	if not(thisDataSet.bof and thisDataSet.eof) then
		thisDataSet.movefirst
	end if
	do while not thisDataSet.eof
		count = count + 1
		if thisDataSet(thisField) = thisValue then
			inDataSet = true
			exit function
		end if
		thisDataSet.movenext
	loop
	inDataSet = False
end function

Permanent link to this article: https://www1.wperry.net/code/isindataset/

Leave a Reply

Your email address will not be published. Required fields are marked *