* tried to add in B an asterisk (IBM*) - doesn't help
* tried to change the perform find from $Company to =$Company - doesn't help.
Can you show us the script steps you are using for this?
I am guessing here, but does your script loop through the found records in table A or only flag the first record in the found set? Are you able to pause your script after it issues the Perform Find step and see how many records are found? Are you testing for an empty found set?
Hi Wim, Daniel,
@ Wim - will do, but let me first look if Daniel's guess solves the problem.
@ Daniel - yes that is a good one. Now I remember I made that similar mistake before (only finding first value).
Will search how that was solved.
Thanks for your help both!
Checked it - and I think it is not the "only find first record issue" that Daniel mentioned.
So here you go, one pdf with the script and one screenshot with the PerformFind opened.
Thanks for your ideas!
1 of 1 people found this helpful
Try to avoid specifying find requests inside the Perform Find script step. It's hard to troubleshoot and not as readable as doing:
Enter Find Mode (---> unselect 'pause' )
Set Field[ largeComapnies::Company ; $company ]
Perform Find (---> no options selected)
We don't see in your script where you flag or how you do in case you have multiple records in your found set. Can you send a new screenshot that show that?
As a total aside: do away with the "go to record [first] just before the find, it's irrelevant what record you are on when you start the search.
What Wim said.
Thanks Wim and Beverly and sorry for the late reply - got flooded with work last days.
I will try out what you say first, then give total feedback plus screenshot as requested.
Einstein's quote is also true about FMP:
“The more I learn, the more I realize how much I don't know.”
Wim and others:
Changed the script to "your way" of using PerformFind.
(Deleted GoToRecord First also).
Here you have the new script version attached, plus two
examples where it only partly works (a large company is
found, but not all occurrences).
The LargeCompany table on the right versus the Companies left.
The flag you asked about:
the field Active is set to NO if Company is found in LargeCompany
(and made yellow with conditional format).
Otherwise Active is set to YES.
I don't see any different spelling, comma's etc that could cause the problem.
Any other ideas? (just thought about hidden format signs?)
Thanks for the ideas!
(PS am on buisness trip so reply might take a few days)
I'm not sure I follow those screenshots, the parts on the left are those the found set after doing a search? If so is the only 'failure' the fact that the conditional format does not work?
Sorry late reply Wim, as said was on a trip.
On the left you see ALL company (name) records. They are always yellow (and set to Not Active)
when they are recognised by the script as a Large Company from the LargeCompany table on the right.
(in case we run the script to omit the large companies).
So Transcom is in the LargeCompany table...the conditional formatting works fine,
but Transcom Worldwide Inc., is NOT recognided as a LargeCompany, while all other Transcoms are.
(not yellow and still on Active is Yes).
Similar occurences with other large companies. This causes you need to check the whole table by hand.
Any ideas what can cause this?
Not without looking at the actual data. It could be a simple as a data issue where the string "Transcom" on the left contains non-visible characters, that would make your test fail.
I will copy those "should have been found but not" fields into a word doc
and switch on the hidden chars.