AnsweredAssumed Answered

Scripting a compound (not-or) find request

Question asked by pm125 on Oct 3, 2018
Latest reply on Oct 3, 2018 by pm125

How would you script the following search: find all records that do not contain 1 in Field_A and whose Field_B is empty?

Manually, I enter Find mode; enter 1 in Field_A; click Omit; create a new record; enter * in Field_B; click Omit; press Return

In a script, I am aware of two methods:

1) My preferred one, if I can get it to work: create a Find Request and use the Perform Find script step. If i create the script step right after performing the search manually, the Find Requests are already there for me to use. However, they seem to be combined using a logical "AND" operator. Can I combine two find requests using "OR"?

2) the method that Beverly wrote she prefers in a previous, very clear and informative post about scripting searches: mimic the manual search process in the script = Enter Find Mode; populate the fields with the search criteria; execute Perform Find.

In this second method, for my search I think I would enter find mode, set Field_A to 1, <click on Omit?>, create a new record, set Field_B to *, <click on Omit?>, and execute Perform Find. How can i click on "Omit" from a script?

 

(incidentally, as I was writing this message I discovered the Menu command "Show Omitted Only", which allows me to run this particular search in the opposite way, as AND and then show omitted records, rather than NOT-OR to find the records i want. However, I would still like the above questions answered, if possible, because my scripted search will need to become more complex in the near future.)

Outcomes