Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script or find or combination?

Featured Replies

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

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

  • Author

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...
  • Author

Fenton,

Worked like a charm...thank you for your assistance!

Jack

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.