I have a document skill with a table:
I want to check in the process skill, if the extract returns any value or not. So I put an IF activity to ask for manual review when the value of one of the row is empty.
Unfortunately the code didn't work. Could you point out my mistake?:
for (var i = 0; i < Context.Transaction.Documents[0].Fields.length; i++) {
var currentField = Context.Transaction.Documents[0].Fields[i];
if (currentField.Name == "New Table"){
for (var j = 0; j < currentField.Children.length; j++){
var currentChildField = currentField.Children[j];
if (currentChildField.Name == "Batch Number" && (currentChildField.Value == null || currentChildField.Value == ""))
return true;
if (currentChildField.Name == "Production Date" && (currentChildField.Value == null || currentChildField.Value == ""))
return true;
}
return false
}
}
return false
Comments
2 comments
I also tried to call the column just like in the advanced scripting rule by using "New Table/Batch Number". It also didn't work
Hi Radityo,
You may need to add looping through instances as well, i.e.:
Please sign in to leave a comment.