AnsweredAssumed Answered

Find Script for several Fields

Question asked by NaturSalus on Jul 10, 2011
Latest reply on Jul 10, 2011 by NaturSalus

Title

Find Script for several Fields

Post

Hello,

I am trying to write a find script that will search for all records that have a certain value in several fields:

The fields are:

  • Foods::BTAS
  • Foods::BTANS
  • Foods::BTBS
  • Foods::BTBNS
  • Foods::BT0S
  • Foods::BT0NS
  • Foods::BTABS
  • Foods::BTABNS

In order to search the records that have, for example, the value "Benefical" in the Foods::BTAS field,  the script that works fine seems to be:

Enter Find Mode []

Set Field [Foods::BTAS; "Beneficial"]

Set Error Capture [On]

Perform Find []

I wrongly thought that searching for records with the value "Benefical" in, for example,  the fields: Foods::BTAS and Foods::BTANS, the find script would be:

Enter Find Mode []

Set Field [Foods::BTAS; "Beneficial"]

Set Field [Foods::BTANS; "Beneficial"]

Set Error Capture [On]

Perform Find []

But it is not.

So. any help on how to write the correct  find script that will search for all the records that have "Beneficial" as value in one or both fields (Foods::BTAS and Foods::BTANS) is much appreciated.

Once I know how to do it for two fields, then I can easily extrapolate to more fileds as needed.

Thanks

Outcomes