Jump 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.

Featured Replies

Hi Guys, 

I have a Script running a calculation for a Find. 

The table is in essence as follows

Item Percentage Find Field

My Script/Calculation is as follows: 

Quote

Enter Find Mode [Pause: Off]

Set Field [Percentage ; Percentage ≥ Find Field ]

Set Error Capture [On]

Perform Find [ ]

Sort Records [Restore ; With dialog: Off]

Go to Record/Request/Page [First] 

 

I have an identical Script with text relating to the item. This works perfectly. 

For some reason the calculated field isn't. 

The input for this Find Field is entered as a decimal number (the setting of the the field turn it into a percentage). So if I am looking to find ≥ 10% I would enter .1 into the Find Field. 

When running the script, I am getting blank, with no matching records - despite the fact I know there are records higher than 10%. 

Am I doing something obvious wrong? I've also tried Find Field ≥ Percentage, but getting the same result - with no records matched. 

Thanks!

N

 

Why is "find field" a field in that table?  Is it a global field?

 

If Find Field is a global field*, and you are trying to find records where percentage is greater than or equal to the value entered in Find Field, then you need to do:

Enter Find Mode []
Set Field [ YourTable::Percentage ; "≥" & SomeTable::Find Field ]
...

Otherwise I have no clue what you're trying to do here.

 

Note that your expression =

Percentage ≥ Find Field

is a Boolean expression; it will return a result of either 1 (true) or 0 (false).

 

---
(*) Only global fields have values in Find mode.

 

 

  • Author

Thank you. As always the advice is spot on. 

I need to learn scripting better! It was the fact that I didn't have the "" and the &.... so it worked in my mind. 

Also, correct on Global Field. I created the Field as a Global Field, for the purpose of searching only. 

Thanks as always :)

You don't need to create global fields in that table, you can use a dedicated table just for global fields and keep your schema 'clean'.  Plus if you are capturing the user's input for what to search on, you can use variables

  • Author

That's true and makes a lot of sense. Thanks!

You also may want to adopt a naming convention for your fields so that you can tell whether they are global or not.  That makes it easier to read your code and interpret it.  Plus your future self will thank you for it.

Create an account or sign in to comment

Important Information

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

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.