MetaServer > Help > Extract > Set Field Value

120-470 MetaServer Edit – Set Field Value

With MetaServer’s Set Field Value rule, you can put text in an index field, replace tabs and line separators with any other text and you can extract specific segments from a value. This can all be done with or without conditions (up to 3 conditions).

It’s often used in combination with the Extract Text rule. You run the OCR engine only once and copy the result to different fields for further modification. In that way, the original extracted text stays intact and only the copied text is transformed for each field individually.

You typically define an Extract Text rule first and place the full page’s text in a “Full Text” field. Next, you would define a Set field value rule to copy the result in another field for further processing.

It’s also useful for:
– Setting default values
– Combining values
– Setting different values conditionally
– Extracting segments from a barcode value using separators such as “,”,“-“ etc.

Example: You want to send an email if someone added a note during validation. To accomplish this, you would add an Extract action after the Validate action. In that Extract action, you add a Set Field Value rule where, if the “Note” field is not blank, you set the “E-mail” field value to the recipient’s e-mail address. If there is no note, the “E-mail” field value stays blank and the e-mail won’t be .

In our example, we will make use of the “CB – INSPECTION REPORTS” workflow. This workflow is automatically installed with CaptureBites MetaServer.

We want to extract the property’s address from the last page of each report. Using a Find Line with Mask / Words rule, we can extract the address lines using the address label.

We want to convert the 2 separate lines to 1 complete address line. To do this, we use a Set Field Value rule.

Set Field Value rules are defined in a MetaServer Extract or Separate Document / Process Page action.

To add this rule, press the Add button and select Edit -> Set Field Value

After extracting the address, we want to convert the 2 separate address lines to a single address line.

TIP: The thumbnail on the right will follow you, so you can easily refer to the Setup window. Click on the thumbnail to make the image larger.

First, add a description to your rule. Then, select the field to hold the extracted data. In this case, we select the field “Address”.

01 – Value: enter the value you want to copy in the selected index field. Press the drop-down button to select different system and field values to compose your text. In our example case, we want to edit the value in the address field, so we select the “Address” field again.

02 – Replace tabs with: replaces tabs, marked as a → character, with the specified character or text.

Using our example:

“Address:→154 Rutherford Avenue
Redwood City CA 94061”
 

After replacing the tabs with a space:

“Address: 154 Rutherford Avenue
Redwood City CA 94061”

03 – Replace line separators with: replaces line separators with the specified character or text.

Using our example:

“Address: 154 Rutherford Avenue
Redwood City CA 94061”

 
After replacing the line separators with a comma and a space “, “:

“Address: 154 Rutherford Avenue, Redwood City CA 94061”

04 – Extract segments: enable the Extract segments option when you want to extract one or more segments from text based on the specified separators.

Using our example:

“Address: 154 Rutherford Avenue, Redwood City CA 94061”

 
After defining “:” (colon) as the separator, you can choose to extract the following segments:
Segment 1 = Address
Segment 2 = 154 Rutherford Avenue, Redwood City CA 94061

By extracting segment 2, you only keep the address part without the label.

 
You can also enter negative values or ranges in the segment selection box.
-1 = the last value
-2 = the value before the last value
1,-3–1= the 1st value and the three last values
Etc.

05 – Apply: choose to only apply the rule if 1 or multiple conditions are met. By default, the rule is always applied.

You can set up a condition by pressing the drop-down arrows to select a conditional field, the condition itself and, if applicable, the value the selected conditional field needs to be compared with. You can set a fixed value or select different system and index values to compose your value.

For example, management needs to receive an email with the document attached when the total due is more than 100 000 dollars. To do this, you set the “E-mail” field to the manager’s e-mail address if the Total Due value is greater than 100000:

06 – and value of field: you can define up to 3 conditions by pressing the “and value of field” button.

TIP: you can copy the current settings and paste them in another setup window of the same type. Do this by pressing the Settings button in the bottom left of the Setup window and by selecting Copy. Then open another setup window of the same type and select Paste.

Subscribe To Our Newsletter

Join our mailing list to receive CaptureBites' latest news and updates


Please check the box below to agree to the privacy policy and continue *


NOTE: if you're experiencing trouble with submitting this form, please try again using another browser.