Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4462 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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:

  • Like 1
Posted (edited)

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
  • Like 3
Posted

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.

This topic is 4462 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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