Question

Default checkbox to true

  • 7 December 2023
  • 2 replies
  • 34 views

Badge +3

I have a choice control in my SmartForm that is setup as a checkbox. The options are Oil and Gas. I want to default them to be checked (i.e. true). How do you set this up? There is a configuration option for Default value with 2 options - None and IsDefault. Change it from None to IsDefault doesn’t do anything. How can I default both boxes to be checked? Thanks in advance. Please note, my control is connected to a SmartObject and is not static. My initial efforts at trying to find a solution to this indicated that i needed to create one to two more views, and that seems like overkill to set a value to true. It also seemed like I could only check one of the two boxes by default and not both.


2 replies

Badge +8

Hello @FreeRangeDingo , I assume you have some sort of lookup table for the Choice Control to the effect of:
 

ID Description
1 Oil
2 Gas


You will see on the control, it has a property Delimiter:

In my example, I changed it to ‘|’

Now, in you view initialize rule AFTER the Populate List Control action, add a Transfer data action where you simply set your control value to 1|2

Userlevel 5
Badge +19

Hi @FreeRangeDingo 
Did this response help answer your question? 

Reply