How to change Show As parameter of a Choice field using code

I have a Choice field with Show As set to Radio Buttons so the user can easily see all the choices when the form first opens. But once the user makes a choice, I want the Choice field's Show As to change to Combo Box so it takes up less space on the form but still gives the user the option to change their choice. How could this be done after the user makes a choice?

2 replies

    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    Assuming the choice field is emty(= null) on opening a new form. You could make a second choice field which is a copy of the first one.To do this you put this formula in the trigger after update of the first choice field (I call it here choice1, and choice2 for the second) choice2:=choice1 and in the second put this so they stay synchronized: choice1:=choice2. The order of the items MUST be the same inorder to work.

    Now on the display field only if of the first choice field you put this: choice1 = null and in the second choice field you put this: choice1 != null. So you style the first with Radio buttons and the second choice field with Combobox.


    • ScaryBear
    • 3 yrs ago
    • Reported - view

    That should work. I'll give it a try. Thank you very much for the quick reply.


Content aside

  • 3 yrs agoLast active
  • 2Replies
  • 662Views