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
David Sekules 29David Sekules 29 

The "Contains" operator doesn't seem to be behaving as documented.

Description: I have a flow which uses a text field entered by the User to find a set of matching records. For example, if they're looking for all the Admin roles, they would enter "Admin" and the lookup finds all roles whose Name "contains" the string "Admin". We then proceed differently depending on whether the search returns a single match, multiple matches or none.

In testing, we're finding that:
  • Searching for "Shotgun 5" returned no matches, where searching "Shotgun" returned a number of matches, including "Shotgun 5"
  • Searching for "Air Tattoo Crew Supervisor 1" returned the single match "Air Tattoo Crew Supervisor 10", ignoring "Air Tattoo Crew Supervisor 1" (which was also present)
  • Searching for "Disabled Enclosure Assistant X" would return nothing, but searching for "Enclosure Assistant" would return all the Disabled Enclosure Assistant roles, 1-4 and X.

According to "Operators in Flow Conditions" (https://developer.salesforce.com/docs/atlas.en-us.salesforce_vpm_guide.meta/salesforce_vpm_guide/vpm_operators_condition.htm) "contains" should return True if "The value for Resource contains what’s entered or selected for Value" - This doesn't seem to be the case, based on the results we're getting above.

Any suggestions?
David Sekules 29David Sekules 29
Thanks, Lokesh, I've checked the article, but I don't see anything relevant to the issue reported. There's mention of a CONTAINS function, but none of the examples given come anywhere near to exceeding 250 characters. Also, I'm not using CONTAINS as part of a flow formula, but as one of the criteria for a Fast Lookup.

Or did I miss something?
Lokesh KumarLokesh Kumar
If that is the Case Please reach out to Salesforce Support they will guide you if there is any product limitation.

Thanks
David Sekules 29David Sekules 29
Yeah, I did that. They sent me here. :D

Thanks anyway, Lokesh. Much appreciated.
Charles HsmanCharles Hsman
Thanks. Implementing on graffiti store near me (https://infamyart.com/) :