コミュニティ

Script is firing on all fields on document

Hello,

 

I am having an issue that I believe I have pinpointed the cause, but do not know how to fix.

 

I have a document definition will multiple rules with scripts. I have a large script rule that has 10 fields in it. 2 of the 10 fields are not read only, Job# and Unit#. I have another smaller script rule that has Job# as a read-only field and another small script rule that has Unit# as a read-only field. 

 

What is happening, is when the user confirms the data on any of the 10 fields in the first script rule, all 3 script rules will execute, presumably because Unit# and Job# are not read-only in that script rule.

 

I don't want script 1 and 2 to fire when other fields are validated. I only want the script to fire when the related field in the script is validated. 

 

Is there any way to accomplish this?

この記事は役に立ちましたか?

0人中0人がこの記事が役に立ったと言っています

コメント

1件のコメント

  • Avatar
    Vladimir Dimitrijević

    Hi,

    Have you tried with: if(Context.Field("YourFieldName").IsVerified) { /* your script here */ } ?

    Best regards,
    Vladimir

    0

サインインしてコメントを残してください。