|
Post by Anthony on Nov 22, 2016 1:09:27 GMT
I am just starting to use the AppTree Action type and just have a quick question
Is it possible to use a VBScript expression inside the Required attribute? For Example:
<SoftwareGroup Id="3bd9a61f-09aa-4074-a756-e6c3464fe660" Label="Maths Software" Required='"%Subject%" = "Maths"'> <SoftwareRef Id="09b707c9-9746-4c03-96c3-2d81c23f77f2" /> </SoftwareGroup>
The Subject attribute is populated via a ChoiceInput on a previous page.
Is this possible in the current version of UI++?
thanks
|
|
|
Post by Jason on Nov 22, 2016 20:31:55 GMT
VBScript? No. Variable replacement yes.
You can use two TSVar actions before before the above though; one to set a TSVar to "True" with the above specified as the condition and one to set the same TSVar to False if the above condition is not met. Then, you can use simple variable substitution:
<TSVar Name="SoftwareGroup1Required" Value="True" Condition='"%Subject%" = "Maths"' /> <TSVar Name="SoftwareGroup1Required" Value="False" Condition='"%Subject%" <> "Maths"' />
<SoftwareGroup Id="3bd9a61f-09aa-4074-a756-e6c3464fe660" Label="Maths Software" Required='%SoftwareGroup1Required%'> <SoftwareRef Id="09b707c9-9746-4c03-96c3-2d81c23f77f2" /> </SoftwareGroup>
I am planning on adding a switch type action that will make the above a little simpler but for now, the above works well.
|
|
|
Post by Anthony on Nov 24, 2016 2:44:43 GMT
That looks like it will solve my problem
thanks for your help
|
|