Newbies surfninja13 Posted March 29, 2016 Newbies Posted March 29, 2016 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.
comment Posted March 29, 2016 Posted March 29, 2016 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 []
Newbies surfninja13 Posted March 29, 2016 Author Newbies Posted March 29, 2016 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
comment Posted March 29, 2016 Posted March 29, 2016 (edited) Do you know how to use the Set Field[] script step? Edited March 29, 2016 by comment
Newbies surfninja13 Posted March 29, 2016 Author Newbies Posted March 29, 2016 I'd like to add it wouldn't be searching a global field, but all existing records. If that helps?
webko Posted March 29, 2016 Posted March 29, 2016 It's getting its list from the global field, to then search all records...
Newbies surfninja13 Posted March 29, 2016 Author Newbies Posted March 29, 2016 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
comment Posted March 30, 2016 Posted March 30, 2016 20 minutes ago, surfninja13 said: If I add any more it just errors out and finds zero. Does this work for you? MultiFind.fp7
Newbies surfninja13 Posted March 30, 2016 Author Newbies Posted March 30, 2016 YES! Thank you very much, I also figured out how to format the Set Field step correctly. Best,
Recommended Posts
This topic is 3416 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now