Skip to main content
Version: 8.0

Set field value

Level: intermediate

You can set up a business rule that will automatically populate page fields using the "Set field value" business rule. You can populate the field with a value from another field, or calculate the value dynamically, using a formula.

note

Business rules represent "page" (i. e., UI-level) logic. This means that the "Set field value" business rule only sets values in the page fields; it does not update the database column values. The user still needs to save the changes on the page to apply them to the database. Likewise, business rules can only be triggered by the changes made on the page. For example, changes made to the database column values through integration logic will not trigger business rules.

Populate a field with the value from another field

You can use the "Set field value" business rule to automatically populate a field with a value from another field of the current section or a field from an object linked to the current section.

Example

A custom section has a Contact lookup field and a Mobile phone text field. Implement the following business logic: whenever the Contact field is populated, populate the Mobile phone field with the mobile phone of that contact.

To implement the logic of the example, add a "Set field value" business rule and set up its conditions:

  1. Open the needed section (e. g., the custom Requests section) and add a new business rule. Learn more about adding and setting up new business rules in a separate article: Set up a new business rule.

  2. Specify the conditions that trigger the business rule in the "IF" block of the business rule if needed. For example, to apply a "Contact is filled in" rule to the requests with the Contact field populated:

    1. Click Add condition. A new field appears.
    2. Select "Contact" in the Field field. Note that boolean fields cannot be used for setting up the condition since they are always deemed populated.
    3. Click the = and select is filled in in the drop-down menu.
  3. Set up the action that triggers the needed business logic in the "THEN" block of the business rule:

    1. Click Add action. In the action drop-down menu, select Set field value.
    2. Select the field to populate automatically in the Select field to populate field. For example, Mobile phone.
    3. Fill out the Specify the value to set field: click ​​​​​​​ → Related objectsContactMobile phoneSelect.
  4. Click ApplySection WizardSave.

Fig. 1 Setting the field value
Fig. 1 Setting the field value

See also

Make a page field editable or locked

Make a page field required or optional

Filter values in a lookup field

Add a BPMN business process to a section

Formulas in business logic and pivot tables