Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Auto-Fill in of minimum value

Avatar

Level 3

I have two cells being calculated. I want the the third cell to automatically fill-in based upon the lesser of those two values.

Example: If cell1 = 5 and cell2 = 7, cell3 should autofill with 5, the lessor of the two

If cell1 = 5 and cell2 =3, cell3 sould fill with 3.

Formula so far in layout:

if (MaxLoan > MaxLoanLTV) then // NewLoan

MaxLoan.presence = "visible"

MaxLoanLTV.presence = "hidden"

elseif (MaxLoanLTV > MaxLoan) then

MaxLoan.presence = "hidden"

MaxLoanLTV.presence = "visible"

endif

Formula in calculate:

$ = sum(MaxLoan) // NewLoan

$ = sum(MaxLoanLTV) // NewLoan

It does reflect a number but not the minimum value.

Thank you.

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi,

you have t copy this script in the calculate event of your target field, use Javascript.

this.rawValue =  Math.min(num_1.rawValue, num_2.rawValue);

min.jpg

Hope it will helps you,

Mandy

View solution in original post

0 Replies

Avatar

Correct answer by
Level 5

Hi,

you have t copy this script in the calculate event of your target field, use Javascript.

this.rawValue =  Math.min(num_1.rawValue, num_2.rawValue);

min.jpg

Hope it will helps you,

Mandy