Skip to main content
garg.kartik789
Contributor ⭐️
September 4, 2023
Question

Merge on the basis on 'contains' operator

  • September 4, 2023
  • 2 replies
  • 41 views

Currently, the data designer offers merge only on the basis of equal to operator. I want to merge on the basis on ‘contains’ operator. Since this functionality is not yet available, is there a workaround available?

For example, Field1 in Object1 has values V1,V2. I want to merge it with Object2 based on Field2 with value V1. How do I achieve this?

2 replies

alizee
VIP ⭐️⭐️⭐️⭐️⭐️
September 5, 2023

Hi @garg.kartik789 

I have needed this as well, and have come to the conclusion that it’s not possible. I have logged an idea that would allows us to achieve this, and which you may want to upvote:

 

 

My idea was to be able to merge on “OR” conditions, which I believe this would work for your use case too (if implemented). 

In the meantime, to achieve what you want, I believe you could perhaps pivot your data (it looks like a multi-select picklist) to turn the V1,V2 etc. into columns. That will give you integer values for each column, probably 0 and 1. You could then merge on column value (with your other data set to which you would have applied the same kind of transformation) or transform them into a true or false or else, and merge on the basis of that transform. 

I haven’t tested this, but that’s a possible route to follow. 

Let me know what you think/if it works out for you. 

Thanks!

A

The most expensive part of building is the mistakes. That's true in construction. Not so much in CSOps. So ask questions, make mistakes and learn. All views expressed here are my own.
spencer_engel
Expert ⭐️
September 5, 2023

I would think a Case Expression can achieve what you need by doing your “contains” logic there and spitting out the two values you’re wanting to merge.