コミュニティ

Run script validations only once

Hello

I have a lot of rule scripts to validate all the fields in my document. But, a customer requires tu run the validation only the first time the document is open in the verification station. Now, my question is: Can I use the IsVerified property of the IField object as a custom flag to check if I need to run or not the validation? Something like:

if(!IRuleContext.Field("myFieldName").IsVerified)
{
//Do something
!IRuleContext.Field("myFieldName").IsVerified = true;
}


Best regards

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

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

コメント

2件のコメント

  • Avatar
    Permanently deleted user
    Hello,

    Rules in such scenarios may lose their meaning.

    You proabably need something like

    if (Context.Field("Field").IsVerified==false)
    {
    do something
    }
    else
    {
    Context.CheckSucceeded=true;
    }

    If user verifies the field, by simply confirming its value by hitting enter, rule will be overriden.In case if value is corrected, rule will be re-evaluated.



    Regards
    Timur














    0
  • Avatar
    Permanently deleted user
    Hello Timur!

    I will try the solution that you provide. What the customer wants it to run the validation only when the document is sent to the verification station. If the user modifies a value inside the verification station I should do nothing.

    Regards
    0

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