Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3160 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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.

 

Posted

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
Posted

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

  • Newbies
Posted

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

This topic is 3160 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.