You are here: Reference > Rule types > Data Transforms > Data Transform form - Update Page action

Data Transform form - Update Page action

Usage

The Update Page action sets the page context for the subsequent (children) steps.

Use the Update Page action when you want to set values on a target page that is different from the data transform's primary page, and you want to:

For example, the following data transforms are equivalent:

Set pyWorkPage.CustomerType equal to "Existing"

Set pyWorkPage.CustomerLevel equal to "Bronze"

and

Update Page pyWorkPage
  Set .CustomerType equal to "Existing"
  Set .CustomerLevel equal to "Bronze"

In the second example, the Update Page action sets the page context to the pyWorkPage, so that the page does not have to be specified for the Target fields in the following children steps.

You can set the page context for the target only, or for both the target and source. To set the page context for the source, select with values from in the Relation list.

JSON data model format

When the data model format is JSON, there are the following differences in behavior:

In addition, the JSON field requires a JSON object name.

Examples

Update Page pyWorkPage
  Set .ZipCode equal to "02139"
  Set .TelPrefix equal to "617"
Update Page pyWorkPage with values from Employees
  Set .ZipCode equal to .PostalCode
  Set .TelPrefix equal to .Prefix

Relationship settings

The following relationship settings are available when the data model format is clipboard:

The following relationship settings are available when the data model format is JSON:

JSON relationship settings example

This example illustrates how to use the relationship settings. The JSON for a customer is as follows:

			{
		       	"id": 123456,
    			"name": "John Doe",
	    		"email": "[email protected]",
		    	"address": {
        			"addressLines": {
		            	"line1": "1 example st",
		            	"line2": "example building"
		    	    },
			        "city": "Example",
		        	"zip": "02142"
			    }
			}
		   

The clipboard structure is as follows:

			pyCustomer
		     	-pyID
		    	-pyName
		    	-pyEmail
	     		-pyAddress
		        	-pyAddressLine1
		        	-pyAddressLine2
	        		-pyCity
		         	-pyZip
		

The tree structures match except for the address line fields. line1 on the JSON side is under the address > addressLines hierarchy, but its corresponding pyAddressLine1 property on the clipboard is directly under pyAddress. In this case, use the Update Page action to update context only on one side. To map the entire structure, update the context for address on both sides, then update the context only on the JSON side, then map individual properties, as shown in the sample below:

Update Page pyAddress For both sides address

Update Page No context change For JSON only addressLines

Set pyAddressLine1 equal to line1

Supported features

You can use the following items in the Update Page action:

Restrictions

About Data Transforms