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

Questions, tips and tricks and techniques for scripting in Servoy

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

Postby Kahuna » Wed Jan 19, 2011 2:33 pm

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:
Code: Select all
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
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

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

Postby ptalbot » Wed Jan 19, 2011 3:02 pm

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...
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

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

Postby Kahuna » Wed Jan 19, 2011 3:29 pm

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

Lol

As always thanks Patrick! :oops:
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

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

Postby ptalbot » Wed Jan 19, 2011 3:35 pm

Keep you hair, man!
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC


Return to Methods

Who is online

Users browsing this forum: No registered users and 2 guests

cron