Good day,
I have 1 document definition that consists of 15 types of document sections and this sections can appear more than once each, how to call specific document sections field into verification script rules?
I can do it easily in export script but I cannot use the script on verification rules.
== Document.Sections.item(0).field("Myfield"),value
I have found way to handle this problem with workaround, but I dont think its the best way to handle this problem.
I have 1 document definition that consists of 15 types of document sections and this sections can appear more than once each, how to call specific document sections field into verification script rules?
I can do it easily in export script but I cannot use the script on verification rules.
== Document.Sections.item(0).field("Myfield"),value
I have found way to handle this problem with workaround, but I dont think its the best way to handle this problem.
コメント
2件のコメント
Hello,
If you add the field of repeated section to the Rule Settings then it will appear IRuleContext.Fields collection.
For example, you have sections X and Y. Y can be repeated for 3 times. From field Field_X of section X you want to access Field_Y in section Y.
The access code will be the following (Context is IRuleContext object of Field_X it will be "this" in JScript):
Field_Y(at 1st page of Y): Context.Fields[1].Items[0];
Field_Y(at 2nd page of Y): Context.Fields[1].Items[1];
Field_Y(at 3rd page of Y): Context.Fields[1].Items[2];
Hi POG.
Yes I already find solution yesterday for my project but thanks for your answer, its enlighten me about what Context means in rule script.
サインインしてコメントを残してください。