variable script expression
Posted: Mon Feb 11, 2019 4:30 pm
Hello,
Curently I'm trying to use the variable script expression to define a choice of variable in a check point with an external metada (from a XML file).
Here is my code :
Switch returns a syntax error. Do you have any idea why ?
Thanks a lot in advance,
Curently I'm trying to use the variable script expression to define a choice of variable in a check point with an external metada (from a XML file).
Here is my code :
Code: Select all
function choixqte() {
var Xpathquantites = [Metadata.Text:Path=''/gaxml/Quantités'',Dataset=''Xml'',Model=''XML''];
var qauntites = job.getVariableAsString(Xpathquantites);
var Xpathqrequiredquantity = [Metadata.Text:Path=''/gaxml/RequiredQuantity]'',Dataset=''Xml'',Model=''XML''];
var requiredquantity = job.getVariableAsString(Xpathqrequiredquantity);
if qauntites != "" {
return qauntites;
}
else { return requiredquantity; }
}
Thanks a lot in advance,