JSON_TO_FIELD (Expression Function)

Purpose

The JSON to Field function (JSON_TO_FIELD) takes the input of a JSON encoded string and converts it to a field value.

Parameters

The JSON to Field function has two input parameters:

Field Value

Allowed Inputs: field value

The builder can enter one string that is JSON encoded. The builder should use the Query Builder to choose a field that contains a value.

Multiple Value Field

Allowed Inputs: 'yes' or 'no'

If Multiple Value Field is set to yes it will tell the function to convert an array of objects into multiple field values that can be stored in a field that has the multiple value option turned on

Output

The output of the JSON to Field function is a WorkXpress field storage value comprised of the value(s) from the JSON Encoded String. For multiple part fields such as address, telephone, or multiple part the JSON should be a string with the proper labels. For example an address might look like {“street”: “123 Main St”,“city”: “Small Town”,“state”: “PA”,“zip”: “17000”}.

Example

This function is most commonly used when communicating with a third party system that can send values that are JSON encoded.

expression function - json to field.txt · Last modified: 2016/09/14 14:19 (external edit)
Copyright WorkXpress, 2020