Can you use a Multi Line Key in a Perform Find Script Step?
I have used a multi line key in a relationship and it seems to work but I cannot seem to get it to work for a found set. any ideas?
You can't use a multi-line to search for individual values in another field because they would never be equal unless the target field holds all the values. You need to loop through the items. Use field global to hold the multiline in this example ... script could be:
Enter Find Mode [ uncheck pause ]Exit Loop If [ Get ( RecordNumber ) > ValueCount ( data::global ) ]Set Field [ yourTextFieldToSearch ; GetValue ( data::global ; Get ( RecordNumber ) ) ]New Record/RequestExit LoopSet Error Capture [on ]Perform FindIf [ not Get ( FoundCount ) ]Show Custom Dialog [ "No records found" ]Show All RecordsGo To Layout [ original layout ]Exit ScriptElse... do whatever with the found setEnd If
NOTE: Using Get ( RecordNumber ) here works on find request numbers as well - just like many of the other Get(*) functions. I could have also used Get ( FoundCount ) and it would have done the same thing since it would be counting the requests.
I should mention that the opposite IS possible ... you can search using one value and find fields with a multiline and the value deep inside it. Each line is treated as an individual record when searching.
This treatment of multi-line fields can bite you. If you have a text field with value of DELTA and you have two records: Record 1 has DELTA in it and record 2 has:
... and you search for duplicates using ! ... FM will say that record 1 and record 2 are duplicates even though they are not.
An alternative to multi-line keys that you might consider is to use a join table instead.
Would you mind expanding a bit (or sharing a link) on how to use a join table for a find script?
Retrieving data ...