Using field values in rule

  • Last Post 08 November 2018
  • Topic Is Solved
stevewgunnersen posted this 31 October 2018

 I am very new to ABBY and have spent the past couple of days trying to figure out how I can refer to the value of one field inside the rule for another.  I am using .Net C# to create my rule.  At this stage I want to simply check to see if a field called "StoreNum" has a value and if it does put it into a field called "CustomerID" within a rule inside CustomerID.  Once I have figured out how to do this I will be expanding the script to do a far more complex task, but am stuck at this basic operation.  Any assistance would be greatly appreciated.

Sample code is below:

using System.Windows;

//System.Data.DataSet ds = new System.Data.DataSet();
bool isStoreID = false;
string StoreID = Context.Field("Document Definition 1/StoreNum").Text;


                Context.CheckSucceeded = true;
                    Context.Field("CustomerID").Text = StoreID;

Order By: Standard | Newest | Votes
Melisa Uy posted this 01 November 2018

 Hi Steve,

Is "CustomerID" manually created field?

Are you getting the read-only error?


When I want to manually create new fields:

1) Create Field > Text

2) Under Recognition tab, Filling type = DO NOT RECOGNIZE

3) Under Verification tab, Uncheck Requires verification


Rule settings:

1) After you add the field, make sure read-only is un-check


Attaching screenshotssss. Hope it helps u :)

Attached Files

stevewgunnersen posted this 01 November 2018


Thanks so much for your response.   I did create the field manually but have made the parameter settings you have suggested.

My issue is not actually updating the field, it is that in the script I can only see that field and none of the other fields in the section.   It almost seems from what I have seen that I somehow have to tell the script that certain other fields are available to the script, just not sure how to do that.





Melisa Uy posted this 05 November 2018

Hi Steve,


OH u need to add the fields on the rule properties page.

see my attached files -> since I only added to fields, only these two can be accessed on the scripting page.


Yeah, I also spent time figuring this out! haha :)

Attached Files

stevewgunnersen posted this 08 November 2018

Thanks guys figured it out.


  • Liked by
  • Melisa Uy