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.

Script which sets a field as the lowest number of several other fields

Featured Replies

Hello. I want to run an occasional script which says:

Make Field 1 the same value as the lowest of Fields 2, 3, 4, 5 and 6.

So if I had:

Field 2 = 27

Field 3 = 7

Field 4 = 236

Field 5 = 85

Field 6 = 103

The script would put 7 in Field 1

Anyone know how to do it?!

Thanks

Philip

If you have several fields which contain numbers which share the same purpose or relation then they should be records instead of fields if those fields contain regular information. But if you need it I think it could be like this Min ( field2 ; field3 ; field4 ... etc ) but you probably don't need script either and can use calculation type or auto-enter replace type on field1.

Still, maybe those that know more will explain why it is important to use records. I know it IS important because I read it here all the time and I know they are right but I don't always know why. :laugh:

  • Author

Hi David - thanks, I'll try that Min function. I can definitely relate to your last sentence!

Still, maybe those that know more will explain why it is important to use records. I know it IS important because I read it here all the time and I know they are right but I don't always know why. :laugh:

One reason it's best to use records for things that are alike* is that records can easily be organized into sets (found or related) and these sets in turn are easy to sort and aggregate.

Another point is that 5 is not a magic number. When you have 5 of something, you are likely to also have 3 or 4 and - eventually - 6 or 7. Now, records are very easy to add by the user, while adding fields requires the developer to change the schema.

---

(*) Numbered fields are almost always an indication that you are dealing with several things that are alike.

Edited by comment

That is perfectly said! I am going to save that because sometimes I forget. The numbering or duplicate field name usually clicks and I stop myself. But it is not automatic thinking to do so. You are the FM bomb, Comment.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.