|
Post by Jason on Nov 16, 2016 23:16:58 GMT
The ChoiceInput item supports a Default attribute to set which Choice should be shown as the default value for the drop list. The interactive user may of course change this to any other supplied value as defined by the other Choice elements. The value specified for the Default attribute should match the value specified for the Value attribute of the desired default Choice element.
<ChoiceInput Question="Please choose an operating system to deploy?" Variable="myOSChoice" Default="Win7"> <Choice Option="Windows 7" Value="Win7" /> <Choice Option="Windows 10" Value="Win10" /> </ChoiceInput>
|
|
|
Post by saltypeaches on Sept 28, 2017 20:11:35 GMT
Jason, is there a way to set a conditional default value, or would I need to set the condition on the entire ChoiceInput element and just have multiple in the config file? I have a ChoiceInput element for "Device Location" in order to determine which OU to place the device in, and I would like to change the default according to the value of a task sequence variable.
|
|
|
Post by Jason on Sept 29, 2017 13:59:21 GMT
Yes, this is doable. Easier to show.
<Action Type="TSVar" Name="OSChoiceDefault" Condition="...">Win7</Action>
<Action Type="Input" Name="OSChoice" Title="Choose an OS"> <ChoiceInput Question="Please choose an operating system to deploy?" Variable="myOSChoice" Default="%OSChoiceDefault%"> <Choice Option="Windows 7" Value="Win7" /> <Choice Option="Windows 10" Value="Win10" /> </ChoiceInput> </Action>
Use a real and valid condition instead of ... of course.
Basically, if OSChoiceDefault is not set, is blank, or doesn't match a valid option, then the Default won't get set.
|
|