Post by sccmryan on Sept 6, 2018 14:02:43 GMT
I'm currently facing an issue where my conditions don't seem to be evaluated correctly? I *probably* am doing something wrong.
I have my users select a location, and based on that location I am trying to allow certain Build Types that the locations have,.
Next I have them select a build type. I'm trying to limit the types based on location conditions.
With the OR statements in there, the "Shop Floor" option never shows up... I dont know if there is a limitation on how many or statements...?
My work around that seems to be working right now is below, which is not elegant at all... but it works...
I also tried
But when I set the condition to
the VAR was created but the SF option didn't show up...
¯\_(ツ)_/¯
Thanks,
Ryan
I have my users select a location, and based on that location I am trying to allow certain Build Types that the locations have,.
<!-- This Section asks for Location-->
<Action Type="Input" Name="MyLoc" Title="Location Selection" ShowBack="True">
<ChoiceInput Variable="Location" Question="Select your Location" Required="true">
<Choice Option="Grand Haven/Novi, MI" Value="GH"/>
<Choice Option="Trenton, OH" Value="TR"/>
<Choice Option="Athens, AL" Value="AT"/>
<Choice Option="Garland, TX" Value="GA"/>
<Choice Option="Queretaro, MX" Value="MX1"/>
<Choice Option="Hermosillo, MX" Value="MX4"/>
<Choice Option="Czech Republic" Value="CZ"/>
<Choice Option="Germany" Value="DE"/>
<Choice Option="France" Value="FR"/>
<Choice Option="Kunshan/Guangzhou, CN" Value="CN"/>
<Choice Option="Japan" Value="JP"/>
<Choice Option="India" Value="IN"/>
</ChoiceInput>
</Action>
Next I have them select a build type. I'm trying to limit the types based on location conditions.
<!-- This Section asks for the build type and allows SF PC if in US, Mexico, China or Czech -->
<Action Type="Input" Name="OSBuild" Title="Build Type" ShowBack="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" Condition='"%Location%" = "GH" Or "%Location%" = "GA" Or "%Location%" = "AT" Or "%Location%" = "TR" Or "%Location%" = "MX1" Or "%Location%" = "MX4" Or %Location%" = "CN" Or "%Location%" = "CZ"'/>
</ChoiceInput>
</Action>
With the OR statements in there, the "Shop Floor" option never shows up... I dont know if there is a limitation on how many or statements...?
My work around that seems to be working right now is below, which is not elegant at all... but it works...
<!-- This Section asks for the build type and allows SF PC if in US, Mexico, China or Czech -->
<Action Type="Input" Name="OSBuild" Title="Build Type" ShowBack="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" Condition='"%Location%" = "GH"'/>
<Choice Option="Shop Floor" Value="ShopFlrPC" Condition='"%Location%" = "GA"'/>
<Choice Option="Shop Floor" Value="ShopFlrPC" Condition='"%Location%" = "AT"'/>
<Choice Option="Shop Floor" Value="ShopFlrPC" Condition='"%Location%" = "TR"'/>
<Choice Option="Shop Floor" Value="ShopFlrPC" Condition='"%Location%" = "MX1"'/>
<Choice Option="Shop Floor" Value="ShopFlrPC" Condition='"%Location%" = "MX4"'/>
<Choice Option="Shop Floor" Value="ShopFlrPC" Condition='"%Location%" = "CN"'/>
<Choice Option="Shop Floor" Value="ShopFlrPC" Condition='"%Location%" = "CZ"'/>
</ChoiceInput>
</Action>
I also tried
<!-- This Section creates a variable that allows SF PC if in US, Mexico, China or Czech
-->
<Action Type="TSVar" Name="SFPC" Condition='"%Location%" = "GH"'>"TRUE"</Action>
<Action Type="TSVar" Name="SFPC" Condition='"%Location%" = "GA"'>"TRUE"</Action>
<Action Type="TSVar" Name="SFPC" Condition='"%Location%" = "AT"'>"TRUE"</Action>
<Action Type="TSVar" Name="SFPC" Condition='"%Location%" = "TR"'>"TRUE"</Action>
<Action Type="TSVar" Name="SFPC" Condition='"%Location%" = "MX1"'>"TRUE"</Action>
<Action Type="TSVar" Name="SFPC" Condition='"%Location%" = "MX4"'>"TRUE"</Action>
<Action Type="TSVar" Name="SFPC" Condition='"%Location%" = "CN"'>"TRUE"</Action>
<Action Type="TSVar" Name="SFPC" Condition='"%Location%" = "CZ"'>"TRUE"</Action>
But when I set the condition to
Condition='"%SFPC%" = "TRUE"'
the VAR was created but the SF option didn't show up...
¯\_(ツ)_/¯
Thanks,
Ryan