Expand my Community achievements bar.

SOLVED

Check if the condition is true between two schemas

Avatar

Level 6

Hi everyone, 

 

I have two schemas, feature_cart & feature_purchase and it has a common column name called feature_name. How can i check for a condition like 

 

if feature_name(feature_cart) == feature_name(feature_purchase), then exclude the recipient else send the recipient to further activities. 

 

Thank you for your help. 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @rvnth ,

Create a Workflow as below,

ParthaSarathy_0-1702613612926.png

Query1: Fetch all recipients from  feature_cart schema.

In additional data, add feature_name attribute and give alias as @featureName

ParthaSarathy_1-1702613803423.png

Query2: Fetch all recipients from  feature_purchase schema.

In additional data, add feature_name attribute and give alias as @featureName

(Basically, alias name should be same for both Schema's Query)

ParthaSarathy_2-1702613807311.png

 

Intersection:

Reconciliation:  "A selection of column"

Primary set: select your primary schema

Columns used for the join: Select the alias column, @featureName

And enable 'Generate complement'

ParthaSarathy_3-1702613932259.png

 

Connect the 'Result' transition of intersection with End activity and 'Complement' transition to rest of your activities in workflow.

Now when you run the workflow, common records with same feature name will go to end, and other records you can process in workflow.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @rvnth ,

Create a Workflow as below,

ParthaSarathy_0-1702613612926.png

Query1: Fetch all recipients from  feature_cart schema.

In additional data, add feature_name attribute and give alias as @featureName

ParthaSarathy_1-1702613803423.png

Query2: Fetch all recipients from  feature_purchase schema.

In additional data, add feature_name attribute and give alias as @featureName

(Basically, alias name should be same for both Schema's Query)

ParthaSarathy_2-1702613807311.png

 

Intersection:

Reconciliation:  "A selection of column"

Primary set: select your primary schema

Columns used for the join: Select the alias column, @featureName

And enable 'Generate complement'

ParthaSarathy_3-1702613932259.png

 

Connect the 'Result' transition of intersection with End activity and 'Complement' transition to rest of your activities in workflow.

Now when you run the workflow, common records with same feature name will go to end, and other records you can process in workflow.