- 19 Jul 2022
- 1 Minute to read
- Print
- DarkLight
Compare Two Objects
- Updated on 19 Jul 2022
- 1 Minute to read
- Print
- DarkLight
Step Details | |
Introduced in Version | --- |
Modified in Version | --- |
Location | Data |
Compare Two Objects is a step that takes in and evaluates whether two different Data Objects of the same Data Type, are identical to one another. As this step compares two Objects, the value for each of its Inputs must be mapped from elsewhere in the Flow and cannot be Constant mapped.
After evaluating each Object, the step outputs a Data Pair List that represents each property of the respective Objects and whether the values differ from each other. This can be useful for comparing complex and lengthy Data Objects such as multiple records for a patient's contact information or evaluating prescription records.
Properties
Inputs
Property | Description | Data Type |
---|---|---|
Item 1 | The first Object that the step compares against Item 2. Note that Item 1's Data Type should be the same as Item 2's. | Object |
Item 2 | Object by which Item 1 is compared against; Item 2 should be the same Data Type as Item 2, | Object |
Outputs
Property | Description | Data Type |
---|---|---|
Results | An output list of matched Data Pairs for each property of the two compared objects. Data Pairs are output as follows: "[Item 1 value] -> [Item 2 value]" | List of DataPair |
Outcome Paths
Compare Two Objects is a fairly unique step in that by default it provides three separate Outcome Paths.
Upon evaluation, if both Objects contain a value, the Flow continues down the Done path where the List of DataPair is output, comparing the two Objects.
If Item 1 is determined to be a Null value, the Flow will follow the Item 1 Is Null path. If Item 2 is determined as Null, then the Flow will continue down the Item 2 Is Null path.
These paths can subsequently be attached to alternate steps to produce different results based upon the evaluation.
Object Overview
Forum Posts:
Matching Two List of Objects
Question about comparing data objects