Restrictions of job.getVariableAsString
Posted: Wed Aug 12, 2026 2:37 pm
Hi there,
what exactly are the restrictions of this function in node.js script expressions?
Given is an XML structure like
In legacy scripting
delivers "value2" as expected. Using Switch variables also works fine.
In node.js I get "The Variable Path is Incorrect".
It looks like referencing the attributes doesn't work in node.js.
Is it a bug oder a feature?
what exactly are the restrictions of this function in node.js script expressions?
Given is an XML structure like
Code: Select all
<Job>
<Meta Key="key1" Value="value1"/>
<Meta Key="key2" Value="value2"/>
<Meta Key="key3" Value="value3"/>
</Job>Code: Select all
job.getVariableAsString('[Metadata.Text:Path="//Meta[@Key=\'key2\']/@Value",Dataset="Job",Model="XML"]');In node.js I get "The Variable Path is Incorrect".
It looks like referencing the attributes doesn't work in node.js.
Is it a bug oder a feature?