Post by cmatejka on Nov 1, 2019 15:18:32 GMT
I'm not sure the best way to go about this or if it is possible, essentially I could do this with If statements but I'm not sure that is supported so I came up with the following idea that sort of works.
I have a drop down box for selecting a department. Each department has a unique value that is set on a variable. There is an associated Task Sequence for each department that only runs if the variable's value matches the condition on the Task Sequence. So, if I pick HR in the drop down, the variable "department" is set to HR and the HR task sequence only runs if the variable "department" equals HR. That part works great.
Following the drop down selection (after clicking next), I want to add an info tab based on which department was selected. An example would be optional software that may need to be installed after the imaging process (which is different for every department). So basically, If "Department" = "HR" do this Action but If "Department" = "Research" do this Action is what I am trying to accomplish. This is what I came up with:
<Action Type="TSVar" Name="AdditionalText" Condition='"%Department%" = "HR"'>Test</Action>
<Action Type="TSVar" Name="AdditionalText" Condition='"%Department%" = "Research"'>Test2</Action>
<Action Type="Info" Title="Additional Text" Name="Additional Text" Image="UI_Banner.png" ShowBack="True">
<![CDATA[%AdditionalText%]]>
</Action>
So that sort of works, but I want the text to be multiple lines and support the html formatting. If replace "Test" in the first line with anything that has brackets, like <br>, it seems to fail to load the XML file. I tried it in quotes, and that didn't work either.
I also tried this... not sure if the format is wrong though, it loads the XML file fine but the If part doesn't work:
<If Condition='"%Department%" = "Research"'>
<Action Type="Info" Title="Additional Text" Name="Additional Text" Image="UI_Banner.png" ShowBack="True">
<![CDATA[<b>%ComputerManuf%</b> | <b>%ComputerModel%</b><br><br>Serial Number: <b>%SerialNumber%</b><br>]]>
</Action>
</If>
Any suggestions on how to accomplish this would be appreciated! Thanks