Set Value Function

Mike Jones
Mike Jones
  • Updated

Set Value Function

The Set Value function allows us to store transformed field values or entire records for later use in Syncari or destination synapse records. There are two options, or field types, when using this function:

  1. This Field: Saves the value directly to the field.
  2. Temporary Variable: Stores the value temporarily for later use.

Understanding how the Set Value function operates is crucial for performing and maintaining data transformations and record lookups in Syncari. This section delves into the Set Value function, discussing these field options and the consequences of choosing one over the other.

Components of the Set Value Function

Screen Shot 2024-03-11 at 9.02.05 AM_e12e63.png

Field Reference:

  • Display Label: An optional field where you can provide a descriptive name of the lookup being performed.
  • Description: An optional field where you can explain the purpose of the lookup in more detail.
  • Select Field: A required field where you decide if you'll overwrite the current field value with a new value or save the new value in a temporary variable. Existing Field is always the default options for this field.
  • New Value: A required field where you'll specify what value should be saved to the existing field or in a temporary variable. This can either be a hardcoded value or dynamically inserted value via a token (more on this later).
  • Multivalue Field: An optional flag that should be enabled if the value inserted in this function is a list/array.
  • Use Empty: An optional flag where you can specify if a blank value is acceptable to be saved on the existing field or in a temporary variable. This is set to false by default, meaning blank values are not saved.

Using Set Value in Pipelines

In Syncari, you can fetch and modify values using functions and actions. However, how do you store these values in Syncari or a destination synapse, or persist them for use by other functions and actions?

Screen Shot 2024-03-12 at 2.09.00 PM_2d9f46.png

In this field pipeline, we are trying to take two separate fields from our Hubspot synapse - First Name and Last Name - and merge them together in Syncari. Below are the steps:

  1. Source Fields: This field pipeline ingests field values from two different source fields - First Name and Last Name
  2. Capitalize Function: Both first and last name values are run through the Capitalize function
  3. Temporary Variables: The newly capitalized field values are stored in two different temporary variables to be later concatenated
  4. Set Value: Both values stored in temporary variables are concatenated and saved in place on the existing field
    1. Remember, you must set the value on the existing field in before saving in Syncari or a destination synapse in order for the new value to be persisted.
  5. Syncari Record: the newly capitalized and concatenated full name is saved to the Syncari field, Full Name

Saving Values to Temporary Variables

In the example from the previous section, we wanted to store the output from a Capitalize function in a temporary variable. Here we'll take a look at how to configure that temporary variable and use tokens to set the new value.

Screen Shot 2024-03-12 at 2.34.46 PM_1e34b6.png

When configuring the Set Value function, choose Temporary variable as the field type. Then, specify its data type and display/API name. Access the token picker by clicking Data Tokens next to New Value.

Screen Shot 2024-03-13 at 8.52.46 AM_fa8a4f.png

In the New Value field, you have the option to either hard code a value or dynamically insert one via a token. When you connect an upstream node to a Set Value node, the values from that node will be available via the Token Picker. 

Saving Values to Existing Fields

Screen Shot 2024-03-13 at 1.03.16 PM_90a60e.png

In the Field type, choose This field instead of Temporary variable. Ensure the datatype matches the previous nodes' outputs (both are Text). In the New Value field, put the values of the temporary variables together with a space in between. Click Data tokens to get token values for these variables.

Attaching Set Value to Syncari & Destination Nodes

If you're modifying a field value - including running any string or math functions on that field - you must save the output to the existing field if you wish to save that new value to a record in Syncari or in a destination synapse. Failure to do so will result in Syncari automatically saving the original field value of current record.

Share this

Was this article helpful?

0 out of 1 found this helpful