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

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

Recommended Posts

Posted

Hi,

Not sure if this belongs in this forum or the find forum (mod- please move if necessary).

Ultimately, the purpose of the script is to eventually return census data based on the postal code of a client (and in turn other clients in the same area. To broaden the postal code search foreventual web search (a potential question in the future), this is done by stripping the last 4 characters from the postal code...this is easy enough (eg. using the left function with 3 characters specified, postal code Z9Z 9Z9 would become just Z9Z). The big question is the proper process to copy the original postal code from the original postal code field, apply the left function (set field?),

then perform the appropriate find (go to a find layout and paste the info?). Sorry for the lengthy post;any guidance would be appreciated.

Jack

Posted

FileMaker usually uses the Set Field [ field to set, value to use ] script step to transfer a single piece of data to a specific place. This works in either Browse mode or Find mode. You almost never (properly) use Copy/paste.

The problem is that there is no data (criteria) to start with in Find mode, and no way to get it then. So you need to get it beforehand and store it somehow. The best way to do this is a Set Variable script step (up there near the top of the script steps). Set Variable is a newer step (FileMaker 8), and is a bit more free-form than many FileMaker steps, in that you name the variable yourself, prefixed by either $ (local to script) or $$ (global). Use local unless you really need to keep that variable value, as a global variable may require some maintenance.

Set Variable [ $code; Left ( PostalCode; 3) ]

Enter Find Mode []

Set Field [ PostalCode; $code ]

Perform Find

Posted

Hello Fenton,

Thank you for the pointing me in the right direction. I will explore the set variable function and see if I can can get my head around how it works (still trying to master the set field function).

Jack

  • 2 weeks later...

This topic is 5502 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.