1
0
-1

Hi team,

I have a scenario where i have an amount field and a checkbox for additional docs. I need to set the value of checkbox as true when the amount >1000.

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Add a Change rule to the Amount field:

       

      if(+data.amount > 1000) {
           data.additionalDocs = true;
      }
      1. Ben Warner

        Note, the user will still be able to deselect the additional docs checkbox, so you may wish to add an editability rule to the checkbox if you wish to stop them from doing this.

      2. Aman Kohli

        Thanks Ben.

        I tried that approach but this change is not reflected when you preview it in Maestro.

        I will try and publish it on TM and see if it reflects that change.

         

        Thanks,

        Aman

      3. Ben Warner

        Hey Aman, I tried this in preview before I posted the answer and it worked fine so you must be doing something differently.

      4. Aman Kohli

        Hey Ben, 

        I got that working.

        Thanks

         

      CommentAdd your comment...
    2.  
      1
      0
      -1

      Another way is a calc rule on the checkbox:

       

      data.amount > 1000

       

      As a calculated field, it would ignore user input on the checkbox itself - so it would make sense to turn off editability. Use Ben's approach if you want to set it and then let it be changed.

        CommentAdd your comment...