Set Values on Current Record

The Set Values form control is used to assign a fixed value to an attribute in the current record.

The Set Values control can also assign a value to the current record without a queried record source. In these cases, since there isn’t a queried value to assign, a static value will need to be supplied instead. This is especially valuable in conjunction with the logical controls that enable/disable the Set Values control, as this allows a static value to be assigned to an attribute in the current table when the conditions set in the logical query are met.

For example, you can set an attribute in the current table to indicate that an asset is enabled when the test pressure for that asset is greater than zero.

Complete the following steps to set an attribute in the current table to indicate that an asset is enabled when the test pressure for that asset is greater than zero.

  1. Create a new Set Values control on the current form.

  2. Open the Set Values control’s query form by clicking the next to the Attributes field in the control’s Properties window.

    Set Values Attributes Field

  3. Leave the Source Query field blank. Only the current record is used for this example.

  4. Enter the static value you want to assign to the target attribute in the current record as the Source Attribute/Value.

  5. Select Static as the Data Source.

  6. Select the desired Target Attribute.

    Set Values Target Attribute

  7. These kinds of static assignments are most useful when used with a logical control (refer to Form Controls Properties). To have the static value Y assigned to the target attribute Enabled only when a set of conditions is met, set a logical query in the Control Properties window with the following conditions:

    Set Values Logical Control

    This will enable the set value control to assign the static value only when the logical condition is met.