function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vijayakumar KenchugunduVijayakumar Kenchugundu 

INCLUDES operator in Flows

Friends,
I have a scenario to create AccountContactRelationship (with Contact Role as Owner) when a specific (Owner) type Contact associated to an Account. But before creating, I need to first check existance of Contact Role (contact role value specifically Owner). I am using Flows to address this requirement. But I have issue with I use Contains operator on the Roles field on AccountContactRelation object. It doesn't consider it as INCLUDES, instead it takes as LIKE. So, it errored out while reading. Please check attached the below image for my logic to fetch existing Owner Contact Role. Is there any better and easy solution than using loops?
And also one more, I do have to delete record in case if owner Contact is removed from Account. How do I use condition to delete specific Contact Role (Owner)? Because it is hard to parse ; separated Roles field to pick Owner role. Your thoughts on this need is much apprecited. Thanks in advance.User-added image
 
ShivankurShivankur (Salesforce Developers) 
Hi Vijayakumar,

Please note that contains operator meaning: An item in the collection that’s selected for Resource contains the exact same value as Value turns out to result into true.

There is no operator like includes which would suffice the exact requirement. You could go and create an idea over Ideaexchange portal to get it reviewed by product teams at Salesforce.

Hope above information helps. Please mark as Best Answer so that it can help others in future.

Thanks.