Make a calculation based on field choice value

cicgordy
Tera Guru

Hi all,

Wondering if you can help me with this.

I created a demand risk assessment section/tab and added some fields. Depending of what I chose (Yes/no OR High/medium/low), I want to make a sum of the values I have given to the choices (I have explained the points into the image below), and by clicking the UI action "Demand risk calculation" the sum of all the points should automatically populate in the read only "Risk score" field at bottom, and also populate High/medium/high in the read only  "Risk level" field (if sum is 2 = Low, if sum is 3 to 9 = Medium and if sum is 10+ = High).

 

 

Many Thanks

 

1 ACCEPTED SOLUTION

@cicgordy 

 

Please find the screenshot below:

PrinceArora_0-1683640705733.png

PrinceArora_1-1683640740340.png

 

Syntax is not correct.

 

 

 

View solution in original post

12 REPLIES 12

@cicgordy 

 

Please share your UI action screenshot and Script too

Their might be some issue in the script

here is the UI action

 

 

-if I select the checkbox "client" then all the tabs disappear and system is unable to load the page

-if I untick the checkbox "client" then when clicking "the UI action", it takes me back to list view and nothing happens.

@cicgordy 

 

Please find the screenshot below:

PrinceArora_0-1683640705733.png

PrinceArora_1-1683640740340.png

 

Syntax is not correct.

 

 

 

Hi @Prince Arora thanks for providing this, I made the changes as you suggested above, now when I select the fields and click on the UI action, it reload the page but doesnt update the "risk_level" and "risk_score" fields with sum, they are empty

@cicgordy 

 

have you selected the right backend values for both?

These fields have been created by you or OOB?

Please add the alert in between to check the values as 

alert(sum);