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,