Skip to main content
All CollectionsWrk Action LibraryText
Retrieve first non-empty value
Retrieve first non-empty value
Wrk Product avatar
Written by Wrk Product
Updated over a week ago

Return the first non-empty value from a list of inputs. This action takes in a list of input variables and returns the first one that isn't `None`, `null`, or `''`. `false` and `[]` (an empty list) are non-empty values and will be returned.

Application

  • Text

Inputs (what you have)

Name

Description

Data Type

Required?

Example

List of variables

List of variables to return the first non-empty value into destination field

List of Text (Long)

Yes

Destination field

The destination field name for list of variables

Text (Long)

Yes

List of variables 2

List of variables to return the first non-empty value into destination field 2

List of Text (Long)

No

Destination field 2

The destination field name for list of variables 2

Text (Long)

No

List of variables 3

List of variables to return the first non-empty value into destination field 3

List of Text (Long)

No

Destination field 3

The destination field name for list of variables 3

Text (Long)

No

List of variables 4

List of variables to return the first non-empty value into destination field 4

List of Text (Long)

No

Destination field 4

The destination field name for list of variables 4

Text (Long)

No

List of variables 5

List of variables to return the first non-empty value into destination field 5

List of Text (Long)

No

Destination field 5

The destination field name for list of variables 5

Text (Long)

No

Note: the value of inputs can either be a set value in the configuration of the Wrk Action within the Wrkflow, or a variable from the Data library section. These variables in the Data library section are the outputs of previous Wrk Actions in the Wrkflow.

Outputs (what you get)

Name

Description

Data Type

Required?

Example

Fields to capture

Text (Long)

Yes

Field1

Outcomes

Name

Description

Success

This status is selected if details are extracted from the JSON.

Impossible to Complete

This status is selected in the event of the following scenarios:

  • A list of variables was filled out without a matching destination field

  • A destination field was filled out without a matching Fields to capture

Requirements

  • N/A

Did this answer your question?