March 29, 20169 yr Newbies Hello All, This may have been addressed before and I am very new to scripting in filemaker. Basically what I am trying to create is a script where I can find records from a carriage return separated list. I have created a field and a button to execute the script. For Example: If I have 50 records for every US State, in the field I could put: California Nevada Oregon Thus populating just the 3 records. Any help would be greatly appreciated.
March 29, 20169 yr Assuming you have entered the three states to find into a global field named gStates, you could have your script do: Enter Find Mode [] Loop Set Field [ YourTable::State; GetValue ( AnyTable::gStates ; Get ( RecordNumber ) ) ] Exit Loop If [ Get ( RequestCount ) ≥ ValueCount ( AnyTable::gStates ) ] New Record/Request End Loop Perform Find []
March 29, 20169 yr Author Newbies Thank you for your quick response. I get an error that an operator is expected in the following portion: Set Field [ YourTable::State; GetValue ( AnyTable::gStates ; Get ( RecordNumber ) ) ] Thanks
March 29, 20169 yr Do you know how to use the Set Field[] script step? Edited March 29, 20169 yr by comment
March 29, 20169 yr Author Newbies I'd like to add it wouldn't be searching a global field, but all existing records. If that helps?
March 29, 20169 yr Author Newbies Ok looks like it searches successfully if I just have 1 "State" in my find field. If I add any more it just errors out and finds zero. I am probably using the Set Field portion incorrectly. Thanks for the help
March 30, 20169 yr 20 minutes ago, surfninja13 said: If I add any more it just errors out and finds zero. Does this work for you? MultiFind.fp7
March 30, 20169 yr Author Newbies YES! Thank you very much, I also figured out how to format the Set Field step correctly. Best,
Create an account or sign in to comment