Dumb Q. Whats wrong with this search?...

I have a foundset search which is returning all of the records in the foundset rather than those found in the search. Much hair loss over a basic challenge. :oops: :cry:

var DupeID = 'false'
	var fsU = databaseManager.getFoundSet('tci_admin','sec_users')
	fsU.loadAllRecords()
	var currentName = forms.tools_frm_sec_users.users_user_name
	application.output(currentName)
	fsU.find()
	fsU.user_user_name = currentName
	var count = fsU.search()
	application.output(count)
	if (count >0){DupeID = 'true'}
	if(DupeID == 'false'){databaseManager.saveData()}

Count always returns all records!

Feedback Appreciated

Are you sure that **user_**user_name is a field in your table sec_users?
You seem to call it **users_**user_name a few lines above…

Doh… I told you it was a dumb question - too much pressure too tight a deadline again.

Lol

As always thanks Patrick! :oops:

Keep you hair, man!