Default value in drop down field

Hi all,

I have a drop down field in my form:

a!dropdownField(
label: "On Behalf",
labelPosition: "ADJACENT",
placeholderLabel: "--select one--",
choiceLabels: {"My Self", "Someone Else", "My Department"},
choiceValues: {"My Self", "Someone Else", "My Department"},
value: ri!requestData.onBehalfType,
saveInto: ri!requestData.onBehalfType
)

When the form loads (before any user interaction), by default, I would like the first choice to be automatically selected- "My Self".

Please how can I do this?

Thanks!

  Discussion posts and replies are publicly visible

Parents
  • There are a couple of options here:

    1. you instantiate the CDT in the process BEFORE this form is generated (assuming this isn't a process 'Start Form'). You can then set the value of requestData.onBehalfType to 'My Self'
    2. You instantiate an instance of the CDT as a local variable, setting requestData.onBehalfType to 'My Self', manage the updates to the CDT in the local! variable and then only copy the CDT from local! to ri! at the point you submit the form
Reply
  • There are a couple of options here:

    1. you instantiate the CDT in the process BEFORE this form is generated (assuming this isn't a process 'Start Form'). You can then set the value of requestData.onBehalfType to 'My Self'
    2. You instantiate an instance of the CDT as a local variable, setting requestData.onBehalfType to 'My Self', manage the updates to the CDT in the local! variable and then only copy the CDT from local! to ri! at the point you submit the form
Children