Philip Jenks Posted November 1, 2012 Posted November 1, 2012 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
David Nelson Posted November 1, 2012 Posted November 1, 2012 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: 1
Philip Jenks Posted November 1, 2012 Author Posted November 1, 2012 Hi David - thanks, I'll try that Min function. I can definitely relate to your last sentence!
comment Posted November 1, 2012 Posted November 1, 2012 (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. 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 November 1, 2012 by comment 3
David Nelson Posted November 1, 2012 Posted November 1, 2012 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now