|
screel88 Newbie
Joined: 12 Jun 2009 Posts: 6
|
Posted: Fri Jun 12, 2009 6:44 pm
%find problems |
When testing to discover if an item already exists in the database, I use #if ( %find( @NewEQ.Name) = "").
The problem is that it always returns all records except the last one even the the name does not exist in the database.
Any ideas? |
|
|
|
Jankomatic Beginner
Joined: 17 Jul 2009 Posts: 12
|
Posted: Fri Jul 17, 2009 8:50 pm |
Anyone want to take a try on this one? %find seems to not work at all for me. I can do a %find(whatever the hell I feel like typing here) and it always returns the same values.
|
|
|
|
screel88 Newbie
Joined: 12 Jun 2009 Posts: 6
|
Posted: Fri Jul 17, 2009 9:01 pm |
Still broken for me as well, no matter which view I give it. %find always returns all the records in that view no matter what string I tell it to search for.
|
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Fri Jul 17, 2009 10:17 pm |
Couple of things to try.
I'll assume the DB windows is already open.
Try
Code: |
#show %find(%concat('"', @NewEQ.Name, '"')) |
If I recall correctly %find assumes it's argument will always be quoted. |
|
_________________ Asati di tempari! |
|
|
|
screel88 Newbie
Joined: 12 Jun 2009 Posts: 6
|
Posted: Fri Jul 17, 2009 11:01 pm |
Thanks for the help. However, that codes give me the same records as without the quotes, which is to say all of them from the current view or all of them from the view I specify as part of %find.
Everything else with my database seems to work fine. Could it possibly be in how I set it up? Would whitespace in the name mess it up? I'm at a loss. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sun Jul 19, 2009 3:36 am |
What is the value of your @NewEQ.Name variable?
|
|
_________________ Asati di tempari! |
|
|
|
screel88 Newbie
Joined: 12 Jun 2009 Posts: 6
|
Posted: Sun Jul 19, 2009 8:24 pm |
For instance, I have something in my database with the Name field set to "earrings jeweled" and when I do a %find("earrings",All,Name) it will return all the records in the database instead of just the one with earrings in it.
|
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sun Jul 19, 2009 9:38 pm |
Does it work if you don't provide the view name? What version of CMUD are you using?
|
|
_________________ Asati di tempari! |
|
|
|
Jankomatic Beginner
Joined: 17 Jul 2009 Posts: 12
|
Posted: Sun Jul 19, 2009 11:12 pm |
It does not work if you provide the view name. 3.08 BETA is what we are both using I believe.
|
|
|
|
screel88 Newbie
Joined: 12 Jun 2009 Posts: 6
|
Posted: Mon Jul 20, 2009 1:24 am |
As stated it works the same with or without the view and columns and I am also using 3.08 Beta...
|
|
|
|
|
|