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 to find in range

Featured Replies

It's strange but I can't get my head around this.

In a table (A) I have a numberfield with the age of a person (age).

In another table (: I have records with two numberfields:

minAge (minimum Age)

maxAge (maximum Age)

I need to find in table (:B all the records where the 'age' from table A falls between minAge - 5 years and maxAge + 5 years.

I start my script from table A where I set a variable $age to 'age'.

Go to table B

Enter find mode

set field minAge > $age -5

... and now I'm stuck...

set field maxAge < $age+5

Perform find doesn't give the right result.

What do I miss here ?

TIA

Where you set the minAge field, do it like this:

">" & $age - 5

  • Author

Thanks Fitch.

Must be the frustration. but that is the way I have it.

The problem is that if f.i. there is a record in B with minAge 21 and maxAge 28 and a second one with minAge 22 and maxAge 33 and the age in A is 23, the search result should be the two records.

It only gives 1 record.

When I do the search manually in B I get the two records.

With the script not...

Hi JrRaid,

Could you please specify how you will do manually the search?

  • Author

Thanks _henry_, where was I all that time.

The second line should be:

SetField(maxAge); ">="&$age +5

to have the the table A age between the table B min/max range.

It's not a bad idea to take some distance for a few hours, return to the file, try again and THEN post a question....if need be....

Hi again,

So, that's good finally you figured it out :B

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.