Table conditions

tableConditions

Condition types

Write condition

This condition is executed when a record is saved. If it fails an error message is shown to the user and the changes aren't persisted. All user defined functions used in this formula must have a C# implementation.

Warning

This condition is executed when a record is saved. If it fails the changes are persisted but a warning message is shown to the user.
All user defined functions used in this formula must have a C# implementation.

Mandatory field condition

Sometimes you need a field to be mandatory only under certain conditions. In this case you can use this condition type to mark a field as mandatory. Not only will the field be marked with the mandatory character * but it will also enforce the user to enter value, returning the specified message when the user fails to do so.
All condition fields must be present in the form for this to work (they can be invisible). Besides this, all user defined functions used in this formula must have both a C# and a Javascript implementation.

Save Record Message

In certain cases, the generic form save message just doesn't fit the type of record that is being saved. One example where this can happen is on an account registration form. With this condition, a user can specify a custom save message and decide if it will always how up or only under certain rules.

Crud conditions

This conditions are evaluated both before accessing the form in the specified mode and when saving the form. In case they fail, the corresponding CRUD action button will be disabled, and the message will be shown in a tool tip:
blockActions

View

When a view condition fails, the following actions are blocked:

  • Edit
  • Duplicate
  • Delete

Insert

When an insert conditions fails, duplication actions will also be blocked.
Insert conditions only block the entry to the form when the fields used are setup by history beforehand or they reference the GLOB table. Otherwise, they only fail when saving the form.

Expression Evaluation

Differently from other formulas in Genio conditions are independent from the area they are defined. This means you only need to specify a condition in the base area and it will generated to all areas that can maintain the logical model.
You can check what areas a condition needs to be

Example

Let's suppose we have the following definitions:

  • Domain A with areas A1 and A2
  • Domain B with areas B1 and B2
  • A foreign key from A1 to B1, and a false key in A and A2.

If I have a condition defined in area A1 with the expression:

[A1->FIELD] > 1

This condition is compatible with A2 and it will be applied in this area.

Now let's imagine you have the following condition also in defined for area A1

[A1->FIELD] == [B1->FIELD]

This condition will not be compatible with A2, since there is the same relation in A2 is a false key.

Note: The conditions must always be compatible with the base area, otherwise a generation error will occur.