Formel

Beregningsformelen for kolonnen.

Datatypen for den første operanden i formelen avgjør datatypen for resultatet. Etterfølgende operander blir konvertert tilsvarende.

Innholdet i feltet tolkes alltid som en formel og aldri som tekst, og det er derfor ikke nødvendig å starte formelen med = (likhetstegn).

Formelen angis på tilsvarende måte som i tabellene Formularelement og Resultat/balansedefinisjonslinje.

The formulas may include:

Macro functions

Looking up in this field leads to a dialog box with macro functions.

When you choose macro functions via lookup, they will be added to the end of the field (after a space if the field contains anything from before), instead of replacing the old content in the field. The field pointer will remain in the field, ready for editing.

If you enter the macros manually, Visma Business will undertake a syntax check of both macro name and parameters, and will change the colour from black to blue when they have been recognised. (The macro function names and field names etc., are stored as numbers in the database, but are displayed in the user's language on the screen.)

Expression

When you use relational operators and/or logical operators, the expressions will return with 1 if true, or 0 if false.

Evaluation order

Parentheses will be evaluated first, and the operators will have the following priority:

  1. Multiplicative operators (*, / and %)
  2. Additive operators (+ and -)
  3. Rounding (~)
  4. Relational operators (=, >, <, >=, <= and <>)
  5. Negation (!)
  6. Conjunction (&&)
  7. Disjunction (||)
  8. Conditions and partial expressions (? and :)

Operators at the same level are evaluated from left to right.

Rounding the results inside the formula can be included with a tilde character (~) and a number. For example, ~1 would round the result to one decimal. Add brackets around the value and rounding parameters. Example: (10,55~1) = 10,60

Relevant error messages

After you have entered a formula, the program displays an error message if the number of opening and closing brackets do not match, or if, for some positions from left to right, there should be more opening parentheses than closing parentheses. In the event of a syntax error, the status bar will display the part of the expression the program has revealed to be wrong.

Egenskap Verdi Beskrivelse
Synlig som standard Ja Dette feltet er som standard synlig i tabellvisningen.
Domene Formel Tekst (260)
SQL-navn Form Navnet på databasefeltet.
Nummer 8414  


Vi setter pris på dine tilbakemeldinger. Send tilbakemelding til Visma på dette emnet.