Set Value Actions: When the System needs to copy or manipulate Field Values in the Web Application
Use of Set Value Actions
Sometimes it is necessary that the system manipulates the value of a field, i.e. the system will either:
- Set the value of a field.
- Changes the existing Value of a field.
- Or removes any content of a field, so that it is blank again.
If you want to achieve this, you need to use the Set Value Actions.
Creating a Set Value Action
The Set Value Designer is a tool, which will guide the user dynamically through the design process. 'Dynamic' means that the system will automatically adjust it's contents, in accordance with the user's selection.
To define a Set Value Action, you need to define:
- Define the Action Title. Use a descriptive title, so that you easily identify this Action within in the Action Builder.
- Use Set Field to select the field which the system needs to modify.
- This field does NOT have to be included on the form. It can be any field (except those field types which are currently not supported) from the underlying component.
- It is also possible to set the value from a Related Component.
- If there could be several records for this relationship (records on a Subform), then you may have to define the rules to Filter Related Records.
See below for details.
- With: Once you selected your field, the system will present you with up to three options what needs to be used to populate the field. Which options are available will depend on the field type:
- Fixed Value
- Other Field
- NULL
- Profile Value
- Optional: you can define a Message, which will indicate to the user that this Set Value Action has been fired.
To set the value of a field ...
|
select With
|
Available for the following Field Types.
|
To a fixed (static) value, which will be the same for each created record.
If you are using Constants, you can set or edit their value from a central location, and it will be applied for every Set Value Action in which the Constant is used.
You will NOT have to make changes to the Set Value Action itself.
(To create Constants which are using Field Values as their Source, please see Use of Constants for Set Value Actions).
|
Constant
|
- Date
- Decimal
- Integer
- Text
- Time
|
To a fixed (static) value, which will be the same for each created record.
Unlike the Constants, these values are defined for each individual Set Value Action.
To change the value, you will need to edit the Set Value Action itself.
|
Fixed Value
|
A fixed value can only be applied to the following field types:
- Text:
Enter the required text. - Integer:
Enter the required number. - SINGLE Lookup Fields:
Select the required value. - Matrix:
Select the required value.
|
To the value of another field. In other words: if you want to copy the value of a field.
For example:
Copy the 'Incident Summary' to a text field on any related Action.
|
Other Field
|
Can be used to any field type, EXCEPT:
- Decimal Fields
- MULTI Lookups
- MULTI Component Lookups
|
To be blank/empty - or in technical terms: to NULL.
For example:
When an Incident has been re-opened, clear the field "Date Closed".
Note: If you have applied a Default Value for this field, the system will apply this default when it is set to NULL via this Action.
|
NULL
|
Can be used to any field type, EXCEPT:
- Decimal Fields
- MULTI Lookups
- MULTI Component Lookups
|
To a value based on the user's profile, e.g. to the user's name or the user's department.
|
Profile Value
|
Can only be applied to fields/relationships for which Profile Values exist.
Typically, these fields could be:
- Person ("Who am I?")
- Department ("Which is your Department?")
- Location ("What is your Location?")
It is the same principle as the one applied for defaulting a field to a Profile Value.
|
When do I need to FILTER RELATED RECORDS to update Subform Records?
When you are updating related records, you have to option to either:
- Update ALL related records whenever the Set Value Action is triggered.
If that is the case, no filter needs to be defined. - Or only update one, or several of the related records.
For example, when creating an Action record from within an Incident, then only set the field "Incident -> Action:Assigned by" when this field is empty, i.e. for new records.
|