コミュニティ

how to compare two fields and show error message use script

Hello every one:

when I create one document definition I want to compare two fields value use Script in rule tab,
And I want to implelement some function:


1.if one field value is empty ,no need to compare.

2.if both fields are not empty ,then if their not the same need show the error message to user in verfication station .

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

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

コメント

2件のコメント

  • Avatar
    Permanently deleted user
    There is probably a better and more efficient way of doing it but here is how I would do I would script it.


    if (not me.Field("Field1").Text = "" and not me.Field("Field2").Text = "") and (not me.Field("Field2").Text = me.Field("Field1").Text) Then





    Me.HasRuleError = true


    me.CheckSucceeded = false


    me.ErrorMessage = "put error message here"





    end if
    0
  • Avatar
    Permanently deleted user
    There is probably something more efficient but here is how I would approach it.:


    if (not me.Field("Field1").Text = "" and not me.Field("Field2").Text = "") and (not me.Field("Field2").Text = me.Field("Field1").Text) Then





    Me.HasRuleError = true


    me.CheckSucceeded = false


    me.ErrorMessage = "put error message here"





    end if
    0

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