Posted Wed, 22 Aug 2018 23:56:18 GMT by

I am trying to put an expression on my PrecedenceConstraint which is just @[$Package::Variable] == "Y". If it was a number, no issues, but the double quotes is a real spanner in the works. I tried using a variable:

 <PrecedenceConstraints >
<#var Test = "@[Package::variable] == \"N\""; #>
<Inputs>
<Input OutputPathName="Get Frozen Val Count.Output" EvaluationOperation="Expression" Expression="<#=Test#>"/>
</Inputs>
</PrecedenceConstraints>

The compiler says N is an unexpected token. What am I supposed to do here?

Posted Sat, 11 May 2019 03:47:43 GMT by jacob alley

Can you try and encode the quotation marks?

& quot ;

is the XML parsable encoding for a quotation mark. so your code would look something like:

 

<Inputs>
    <Input OutputPathName="Get Frozen Val Count.Output" EvaluationOperation="Expression" Expression="@[Package::variable] == &quot;N&quot;" />
</Inputs>
Posted Sat, 11 May 2019 03:47:44 GMT by
Great. Thanks, that worked. Ill add it to my list of things to try when stuck!

You must be signed in to post in this forum.