Skip to main content

Temporary Field

The Temporary Field is a hidden value that your rules share while one document is processed. A Transformation rule writes a value into it, and later Transformation or Rejection rules check that value in their conditions. It starts empty on every document and is discarded when processing ends: it is never saved on the document, never shown on the review screen, and never included in the exported data.

Use it when one rule cannot do the whole job. Before the Temporary Field existed, the only way to pass a result from one rule to another was to park it in a spare real field, such as a shipping or reference field, which then went out with the document even though it was only needed by the rules. The Temporary Field removes that workaround.


How It Works

Where to Find It

Temporary Field appears near the top of the Field list in the rule builder, for every document type:

  • In Rule conditions, right after Entire Document

  • In Rule actions (Transformation rules only), right after Flag

It has no sub-fields, so a single click selects it. To find every rule that uses it, type "Temporary Field" into the search box on the Transformations screen.

Writing and Reading

  • Transformation rules write it in Rule actions. A rule can SET it to a value you type, or to a column of a linked supporting file (for example {Category}). INCREASE, DECREASE, MULTIPLY and DIVIDE can change a number already held in it.

  • Transformation rules and Rejection rules read it in Rule conditions, exactly like any other field, with every condition operator.

  • There is exactly one Temporary Field per document. If two rules write it, the last one to write wins. Let one rule write it for each job; any number of rules can read it.

A Simple Example

A customer prints the same tax ID in three formats on its orders, and its orders need a different delivery code depending on the delivery name. A single rule cannot do this, because a rule cannot mix OR and AND.

Rule

Conditions

Action

1

Buyer -> VAT No CONTAINS 1234567890 OR CONTAINS 123-456-78-90 OR CONTAINS 123-45-67-890

SET Temporary Field to CUSTOMER-A

2

Temporary Field = CUSTOMER-A AND Shipping Details -> Name 2 CONTAINS Warehouse

SET Shipping Details -> ShipTo to 1001

Rule 1 recognizes the customer once, whichever format is printed. Rule 2, and any other rule that needs to know the customer, checks the Temporary Field with AND instead of repeating every format. The exported document carries the ShipTo value; CUSTOMER-A is not in it.

Evaluation Order Within a Scope

Inside one scope tab, the order of the rules does not matter for the Temporary Field. The system runs the rule that writes it before the rules that read it, whatever order they are configured in.

Across Scopes

Transformation rules are evaluated weakest scope first (Global, Country, Organization, Trading Party specific with one party, Trading Party specific with both parties), and each scope level normally re-reads the document as it arrived. A field changed by an Organization rule therefore still looks unchanged to Trading Party rules.

The Temporary Field is the exception. It is not part of the document and is not reset between scope levels, so a value written at one scope can be read at the same scope or at any more specific scope that runs after it. For example, a rule on the Organization specific tab can write it and a rule on the Trading party specific tab can read it.

The reverse does not work: a rule cannot read a value written by a more specific scope, because that scope has not run yet. Such a rule finds the Temporary Field empty, and its card on the console's Enrichment tab stays Not Applied with the reason shown in words.

Two kinds of rules run after all scopes and can read a value written at any scope:

  • Rejection rules

  • Transformation rules whose only action is to raise a Flag

Line Items

If the rule that writes the Temporary Field uses a line field (for example Items[] -> Article ID), each line gets its own value. A typical use is looking up each line's product in a supporting file and storing that row's category for the line. Lines whose product is not found keep an empty value.

How a later rule reads those line values depends on whether the reading rule uses a line field anywhere, in its conditions or its actions:

  • A rule that uses only header fields reads the values of all lines together, plus any document-level value. Empty values are skipped.

    • =, CONTAINS, >, >=, <, <= and IS_NOT_NULL are true when at least one value matches.

    • !=, NOT_CONTAINS and IS_NULL are true only when no value matches.

    • Each condition is checked on its own, so two conditions can match two different lines. For example, Temporary Field = Category A AND Temporary Field = Category B is true on a document that mixes both categories, which is useful for flagging mixed documents for review.

  • A rule that also uses a line field works line by line. Each line reads its own value. A line with an empty value falls back to the document-level value, if a header rule wrote one. A line never reads another line's value.

Because empty values are skipped, Temporary Field != Category A is also true on a document where no line was found in the supporting file at all. Check for the value you want with = or CONTAINS rather than for its absence.

Writing Rules With Generate with AI

You can describe Temporary Field rules in plain English and use Generate with AI. Write one sentence per rule and write "Temporary Field" in full, for example:

  • Look up each line's Article ID in the ProductCode column of the product file and put that row's Category into the Temporary Field.

  • If the Temporary Field is Category A and the buyer name contains Central, set the ShipTo to 1003.

Before saving, check the generated rules: the Field column should say exactly Temporary Field, and a supporting-file value should be the column name in curly brackets, spelled exactly as in the file's header row.

Seeing the Result

The Temporary Field itself is never displayed. To confirm a chain of rules works, check the field the reading rule changes (such as ShipTo) or the flag it raises. On the console's Enrichment tab, the card of a rule that only writes the Temporary Field shows as applied and states that it set a temporary field, but does not show the value.


Supported Configurations and Options

Configuration

Detail

Rules that can write it

Transformation rules, in Rule actions

Rules that can read it

Transformation rules and Rejection rules, in Rule conditions

Values it can hold

A typed value, a supporting-file column, or a number changed with INCREASE, DECREASE, MULTIPLY or DIVIDE

Condition operators

All condition operators, including IS_NULL and IS_NOT_NULL

Number of Temporary Fields

One per document (one per line when written by a rule that uses a line field)

Document types

Available in the Field list for every document type

Lifetime

Starts empty on every document; discarded when processing ends


Other Technical Specifications

Behavior

Detail

Visibility

Never saved on the document, shown on the review screen, or included in exported data

Text comparison

Capital letters do not matter, and neither do spaces at the very start or end. Everything else must match exactly

Numbers

Arithmetic needs a number already held in the Temporary Field, written with a dot as the decimal separator (12.50, not 12,50). On an empty value, arithmetic does nothing

Empty value

When nothing was written, = X is false, != X is true, and IS_NULL is true

Scope reach

Readable at the scope that wrote it and at any more specific scope; Rejection rules and flag-only Transformation rules can read it from any scope

Conflicting writes

The last rule to write it wins


Notes

  • The Temporary Field cannot be used in Instruction Builds. Instructions can neither write nor read it

  • Rejection rules can read the Temporary Field but cannot write it

  • It cannot copy a document field's value into itself, and a rule cannot set a field to "whatever the Temporary Field holds". Set the field to a fixed value, or to a supporting-file column with its own lookup

  • It cannot be compared with another field, only with a fixed value or a supporting-file value

  • There is only one Temporary Field. Named or numbered variants, such as "Temporary Field 2", do not exist

  • The Temporary Field holds only text. It does not remember which row of a supporting file its value came from, so a reading rule that also takes another column from the file needs to repeat the lookup condition (for example Items[] -> Article ID = {ProductCode})

  • Disabling the rule that writes the Temporary Field leaves it empty, so every rule that checks it for a value stops matching

  • Place the writing rule on the same scope tab as the rules that read it, or on a broader one. A reading rule on a broader tab than its writer runs first and finds the Temporary Field empty

  • Spell the value in the reading rule exactly as it was written (for example, the full category name from the supporting file), or use CONTAINS

Known Limitations and Edge Cases

  • When a document has lines with different values and several reading rules each match one of them, every matching rule applies and the one that runs later wins any field they both set. Add a flag rule for mixed documents if a person should decide

Did this answer your question?