Set Field Value
Modify a specific field's value within your list objects.
Use Case
You have a list of objects where certain field values need adjusting. You need a solution that not only allows straightforward field value modifications, but also supports conditional changes and nested element modifications.
Overview
The Set Field Value
action enables the customization of a field's value within a list of objects. Whether it's for conditional value adjustment based on specific criteria or working with nested elements, this action offers the flexibility you need.
Parameters
Parameter | Description | Required |
---|---|---|
List to Transform | The list of objects you want to modify the contents of. | |
Field to Update | Specify the field to be added or modified in each object. | |
New Value | Specify the value for the new or modified field. | |
New Value Mode | How you want to provide the field's new value. | |
Parent Fields | If the field should be nested within another list, specify the parent list's name here. | |
Condition Field | If you want to update the field conditionally, specify the field to base the condition on. | |
Condition Value | If a |
Usage
Let's break this down into specific use-case examples, to show how each of these methods can be used within the Set Field Value
Transform.
Input List
Assume that we have a list of objects called my_list
that looks like this:
Update Methods
Using the New Value Mode
you can define how you want to provide the data for the outputting field. You can do one of two things:
Copy From Field: allows you to copy the value from an existing field
Set Value: provide the literal value you'd like the field to be set to.
Here are some examples of how we can use this action to update or add to our list:
Results Output
After all these examples are performed in the transformation, your newly updated list would reflect these changes in their outputted results as such:
With the knowledge of the Set Field Value
action, you're now equipped to make modifications to the field values in your lists of objects. Remember, the aim is not just to change values but to improve the readability and utility of your data.
Last updated