Searching multiple found records for a field value....loop required?
I have a script where one section searches a table for a records that match a certain record id.
Once I find matching records, I want to check if any of them have a value of "X" in a different field.
If any of them have the value "X", alert the user and exit, if none have it, do various other things.
Does this require a loop that checks each record? OR is there a faster/simpler method?
I was trying to use:
Set Error Capture [On]
Go to layout ["Quote Item"(QuoteItem)]
Enter find mode
If [(Get(FoundCount) > 0) and (QuoteItem::quote_item_status="X")]
Go to layout [$layout_name]
Show custom dialog ["Note"; "This quote item is already on a Purchase Order"]
This seems to only search the first record, which make sense.I just wasn't sure of the most efficient approach to find any record with that value.