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.

variable find

Featured Replies

How do you write a script to find all records within a certain range of a value in a field in the current record.

Such as?

  • Author

if field (1) in the current record has the value of 4

and field (2) in the current record has the value of 100

i want to find all records that have a value of 2

Create two global fields, call 'em gField1 and gField2

SetField (gField1, Field1)

SetField (gField2, Field2)

Enter Find Mode

Set Field (Field1, (gField1 - 2) & "..." " (gField1 + 2)

Set Field (Field1, (gField2 - 10) & "..." " (gField2 + 10)

Perform Find

Additionally, you could create two more global fields, called gRange1 and gRange2, and a layout where these fields exist. Then the script is:

SetField (gField1, Field1)

SetField (gField2, Field2)

GoToLayout[LayoutWithGlobalRangeFields, Pause]

Enter Find Mode

Set Field (Field1, (gField1 - gRange1) & "..." " (gField1 + gRange1)

Set Field (Field1, (gField2 - gRange2) & "..." " (gField2 + gRange2)

Perform Find

  • Newbies

i cannot make this work

Set Field (Field1, (gField1 - 2) & "..." " (gField1 + 2)

maybe i don't understand the abreviations

it does not accept "

Change

Set Field (Field1, (gField1 - 2) & "..." " (gField1 + 2)

to

Set Field (Field1, (gField1 - 2) & "..." & (gField1 + 2)

If you did this manually, you would enter

2...6

in the field, if valus is 4.

This is exactly what Lee's script does.

  • Author

thanx

that works

Wups -- typo on my part.

Good catch, cj.

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.