Skip to content · Zum Inhalt

Formulas, lookups and decision entries

A formula is text that computes a value from the answers: a quantity, a description, a comment, a new quantity a combination applies. A formula reads the codes of the family's options, uses arithmetic and text functions, and can look a value up in another table. A lookup names the table, the field and the filter; a decision table turns matched values into a result.

Before you start

  • The family and its questions exist, because a formula reads the codes of its options.
  • The table and the field a lookup reads exist, and you know the filter that picks the record.
  • You know where the formula is used: a quantity formula on a question or an answer, the description template, a comment template, or a combination.

Set up a lookup

  1. Choose the search icon, enter Lookup Configurations, and open the page.
  2. Choose New and give the lookup a Code.
  3. In Table ID and Field ID, name what is read, and in Filter String or Lookup Table View which records qualify.
  4. In Find Mode, decide whether the first, the last or the exact record is taken, and in Filter Sorting the order.
  5. Use the code in a formula. A lookup that finds nothing is reported by the error variant and silent in the other.

Configured items whose description and price a lookup filled, one line for each answer

Open the decision table of a lookup

  1. Choose the search icon, enter Decision Entries, and open the page.
  2. Read an entry by its Code and its Entry No. — the order decides which entry wins.
  3. Read the keys: up to three text keys and three numeric keys. The first entry whose keys all match wins, and a blank key matches anything.
  4. Read Text Lookup Result and Numeric Lookup Result, the value the entry returns.
  5. Close the page.

The rules a decision table is written from, each with its code, its sentence and its group

Read the expression trace of a run

  1. Configure a product, or run a formula, with the trace switched on for your user.
  2. Choose the search icon, enter Expression Trace, and open the page.
  3. Read the steps in order: Step Type says whether a variable was read, a function called, an operator applied or a value looked up.
  4. Read Input Expression, Position, Size, Detail and Result for each step, which is where a wrong value is seen.
  5. Choose Refresh Trace to read the run again, or Clear Trace to start with an empty trace.

A list of codes and descriptions with their line counts, the shape a traced set of values has

Example

The description template of QUALIA Manufacturing ApS builds Desk Blue from the family's answers. When the text comes out wrong, the administrator opens Expression Trace, sees the step that read the surface answer, and finds a choice whose Item Description Text is empty. The lookup of the price, set to First with a filter on the family, supplies 1,245.80.

What happens

  • A formula that names an unknown variable or function, leaves a bracket open, divides by zero or uses text where a number is needed is refused, and the message names the formula and the position.
  • A lookup that finds nothing is reported by the error variant and silent in the other.
  • The trace is temporary: it belongs to your user and is emptied by Clear Trace.

If something goes wrong

  • A formula is refused and the message names a position. Read the formula at that position: an unknown variable, an open bracket or a text where a number is needed. Correct it.
  • A lookup returns nothing. The filter picks no record. Widen the Filter String, or use the variant that reports the miss.
  • A division by zero is refused. A quantity formula divides by an answer that is zero. Guard the division or correct the answer.
  • The trace stays empty. The trace is not switched on for your user, or the run happened before it was. Switch it on and run again.