Post by sccmryan on Nov 21, 2018 16:44:08 GMT
Hello - Me again...
Fair Warning - I copy/paste/cheat/ steal so I'm probably just not understanding a lot of this fully...
I'm having UI++ Authenticate to approve access and also collect user groups...
I then use the below code to set a variable based on user groups found during authentication...
I then am trying to use that variable to give extra options...
But when I try it, it doesn't show up.
The below is from the log...
Apparently True = True = False???
Thanks for any feed back or recommendations...
-Ryan
Fair Warning - I copy/paste/cheat/ steal so I'm probably just not understanding a lot of this fully...
I'm having UI++ Authenticate to approve access and also collect user groups...
<Action Type="UserAuth" Title="User Authentication" Domain="domain.com" MaxRetryCount="3" Group="SCCM - Service Desk;SCCM - SysAdmins" GetGroups="True" ShowBack="True">
<Field Name="Domain" ReadOnly="True" />
</Action>
I then use the below code to set a variable based on user groups found during authentication...
<Action Type="Switch" OnValue="%XAuthenticatedUserGroups%" DontEval="False" >
<Case RegEx="(^|.*,)SCCM - SysAdmins(,.*|$)">
<Variable Name="ADMIN">"TRUE"</Variable>
</Case>
<Case RegEx="(^|.*,)SCCM - Service Desk(,.*|$)">
<Variable Name="ADMIN">"FALSE"</Variable>
</Case>
</Action>
I then am trying to use that variable to give extra options...
<Action Type="Input" Name="OSBuild" Title="Build Type" ShowBack="True" Condition='"%SFPC%" = "TRUE"'>
<ChoiceInput Variable="OSBuild" Question="Please Choose Build Type" Required="True" Default="OfficePC">
<Choice Option="Office PC" Value="OfficePC"/>
<Choice Option="Shop Floor" Value="ShopFlrPC"/>
<Choice Option="Admin PC" Value="AdminPC" Condition= '%ADMIN% = "TRUE"' />
</ChoiceInput>
</Action>
But when I try it, it doesn't show up.
The below is from the log...
Initiating <Switch> Action:
* Switching on value of 'GroupName,GroupName2,SCCM - SysAdmins,GroupName3,GroupName4,GroupName5,GroupName6,'.
* Found Case with regular expression: (^|.*,)SCCM - SysAdmins(,.*|$).
+ Regular expression matched.
+ Set the task sequence variable 'ADMIN' to the value 'TRUE'
Initiating <Input> Action: OSBuild
* Adding Choice: 'Office PC', value: 'OfficePC', alternate value: ''
* Adding Choice: 'Shop Floor', value: 'ShopFlrPC', alternate value: ''
* Evaluating Condition for <Choice> Admin PC: %ADMIN% = "TRUE" ?? TRUE = "TRUE"
= Condition evaluated to false
- Not adding Choice Admin PC
* Adding <ChoiceInput> Input: Please Choose Build Type
Apparently True = True = False???
Thanks for any feed back or recommendations...
-Ryan