Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi,

I want a script that will search my 8 field names, all numerical, and display the highest one on an invoice / new layout.

I am a total beginner, so I thank you in advance!

Posted

I'm not sure if I'm clear on what you're asking for but if you want to compare the values in the 8 fields, you can create a calculation as follows:

let(

[

val1 = if( Field1 > Field2 ; Field1 ; Field2) ;

val2 = if( val1 > Field3 ; val1 ; field3) ;

val3 = if( val2 > Field4 ; val2 ; field4) ;

val4 = if( val3 > Field5 ; val3 ; field5) ;

val5 = if( val4 > Field6 ; val4 ; field6) ;

val6 = if( val5 > Field7 ; val5 ; field7) ;

val7 = if( val6 > Field8 ; val6 ; field8) ];

val7

)

Each "val" is comparing two numbers, choosing the highest and then the next "val" compares the previous number to the next number. In the end, you get the highest value out of the 8 fields.

Does that do it?

Posted

Why not just use Max ( Field1; Field2; Field3; Field4; Field5; Field6; Field7; Field8 ) ?

Posted

I knew there was an easier way!! Thanks :

I couldn't wrap my head around it this morning for some reason.

This topic is 6064 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.