How to poplulate a control using calculated value based on value of another control

  • 26 April 2019
  • 4 replies

Hi there,


I have a drop-down list in my view with 3 static options A, B, and C.  If user selects A or B, I hope that in the amount payable field will show "$10". If user selects C, the amount payable field shows "$30".  How can I achieve that?


After that, user has to choose the reason for submitting the form which I have created 4 choices using button list control.  If user selects the first reason in the list, the amount payable field will change to $0.  For all other reasons, the amount remains unchanged. Again, how can I achieve that?


Thank you.

4 replies

Badge +16
Easy, use Rules.

Just do something like:
If Drop down value = A or B, then make payable field whatever
If Drop down value = C, then make payable field that

Again, further down, another rule which says if choice is the first reason, set payable field to $0

Done this a zillion times, its worth looking at doing this as hidden views, so hide the second bit until the first part is answered, saves a tonne of time on doing additional rules to cover users messing with the sequence of things.

In Rules Designer under Events, I have chosen "When a control on a View raises and event" (in order to select the drop down value control).  and selected "a control controls a specific value" in Conditions (in order to set when drop down value to A or B or C per my static list).  However, when I moved on to Actions, there doesn't seem to be much choices to populate the payable amount.


Should I have chosen some other events/condition/rules especially in Actions?

Badge +9

1. Select When Control on View/Form Raises an Event

2. Select DropDown1 is Changed

3. Select an Advanced Condition is True from Conditions Tab

4. Inside Advanced Condition Add 2 Conditions,

    In Cond 1 Drag DropDown1 on to Left  = Type A in Right

    In Cond  2 Drag DropDown1 on to Left  = Type B in Right

    Select OR in Expression Below and Click OK

5. Select "Set a Control Properties" Select the payable control and in that set text to $10

6. Select Else condition from Conditions tab and below that use Same Set a Control Properties rule to Set the payable control text to $30.


Same way you need to do for other drop down.

Thanks a zillion Vijay!  I managed to get my rule to work with Advance Condition!