Adri Oosterwijk Posted October 21, 2011 Posted October 21, 2011 Hi all, Probably this is a simple issue but I'm lost. In my database is a field called "Row" In this field there are values such as: Sl 1-1 Sl 1-2 Sl 1-3 Sl 1-3a Sl 1-4 Sl 1-5 and so on. I set a variable $$CHECKROW with a value form one table and the find is performed in another table. When I do a search in a script for $$CHECKROW ( value Sl 1-3a ) it is working great. Only one record found wich is matching the criteria. However when I perform this find for Sl 1-3 it also finds Sl 1-3a and that is not ok. In the find dialog I can set the criteria to ==$$CHECKROW but that don't work. I think FM is searching for the exact value "$$CHECKROW" and not the exact content of the variable. Is there a way to find the exact value of this variable. Thanx for your help.
comment Posted October 21, 2011 Posted October 21, 2011 In the find dialog I can set the criteria to ==$$CHECKROW but that don't work. Try it this way: Enter Find Mode [] Set Field [ YourTable::Row ; "==" & $$CHECKROW ] Perfom Find [] BTW, things may be easier if you follow the "one fact per field" thumb rule.
RSGC Posted January 4, 2012 Posted January 4, 2012 I have known about this issue for some time. I thought values with no spaces would work "properly," in fact I thought I solved this issue in the past by making value lists with no spaces. My situation is slightly different. The user will initiate the search, and the field type is a pop up based on a value list. There are about 20 items in the value list now, but that will grow some and change by user action over time; as an example of two of them: Staff REO-Staff The problem is a search for Staff returns both values. It seems the same not matter the field type (check boxes, etc), which makes sense. I could put REO in a different field, but there is no logical value for the plain "Staff" value for the field that would hold REO. For a variety of reasons the list needs to be editable. I am probably not savvy enough with scripting to make a work around without help, but not sure that would even be possible (I am thinking of a field exit script, but not sure how that works in find mode,etc, but it seems there should be a simple fix for this. Suggestions welcome.
comment Posted January 5, 2012 Posted January 5, 2012 Actually, if the value were "REOStaff" (one word) instead of "REO-Staff" (two words), then searching for Staff would not find it. However, even in your current situation searching for ==Staff will not find "REO-Staff".
LaRetta Posted January 5, 2012 Posted January 5, 2012 The user will initiate the search, and the field type is a pop up based on a value list. Adding == is still the answer but you will then need to intercept the User specs. Pseudo script might look like: Enter Find Mode [ pause ] Set Field [ (not needed) ; "==" & Get ( ActiveFieldContents ) Set Error Capture [ On ] Perform Find [ ] If [ not Get ( FoundCount ) // no records found ... do whatever if no records are found Else ... do whatever with your found set End If This of course would not work with checkbox. If more than one find request or multiple fields being searched, you would want to be explicit. I was being lax because we could in this ONE instance.
Recommended Posts
This topic is 4723 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now