AnsweredAssumed Answered

Issues changing Radio button choice selection based on a form variable current status

Question asked by caonabo on Oct 13, 2017
Latest reply on Oct 20, 2017 by emha

I am creating an IT checklist form that has a Choice control with three radio buttons to allow a Manager to ‘approve’, or ‘reject’ a checklist back to either Setup or Tester Tech.


(*) Approve  (default)     ( ) Reject to Setup Tech    ( ) Reject to Tester Tech




When the Manager clicks the [Submit] button, the checklist changes status from ‘Manager_Review’ to ‘Approve’, ‘Rejected_to_Setup’ or ‘Rejected_to_Tester’, based on choice selection.

When the Tech re-sends the corrected checklist to the Manager, the form status changes back to ‘Manager_Review’, and the choice button should switch back to option ‘Approve’, but it always keeps the last ‘Rejected’ choice selected, regardless of the form status.


Any idea on how to get it to work? I am trying to change the selected choice based on a form variable current status.


I was trying to create a rule like the one below, using two nested if statements, but it does not work, as I do not know how to pass the index to the Choice control to change selection.

if(contains(fvChecklistStatus,'Manager_Review'), radbtnsApproveOrReject[1]', if(contains(fvChecklistStatus,'Rejected_to_Setup'), radbtnsApproveOrReject[2], radbtnsApproveOrReject[3])) 


I am sure it can be done using JQuery, but my knowledge of it is still very limited.