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
TriggerTrigger 

Can I partial match in visual flow?

My use case is as follows

in my flow a user enters a subject into a text input field. I then place the input into a variable. I then perform a record lookup on a custom object to find any records that match that variable. I then have a dynamic choice that displays the records.

When finding records the criteria I am using is
Custom_field - Contains - Variable

this works fine when the custom field is an exact match for the text string in the variable. Example - If I enter Account team in the input field, it will find a record with a string like "I have an account team" in it. If I search "Team account" it returns null. It only matches an exact string.

What I need is to match based on any word in the string. A like function or something similar.

Is there any way to loop through a string and search each word or a way to perform a partial match?
James LoghryJames Loghry
You should be able to do this with the contains operator, but I just tried it myself and it looks like there's a bug which only returns exact matches for the contains operator.  If I were you, I would open a case with Salesforce support, giving them explicit instructions on how to recreate the contains issue.

Alternatively, you could create an Apex method with the annotation @InvocableMethod and pass in your string, then do a SOQL query using a where clause with LIKE '%' + string + '%', then return the results back to your Visual flow.