web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to return results ...
Power Automate
Unanswered

How to return results from an array that contain a substring from a column in another array?

(0) ShareShare
ReportReport
Posted on by 11

I want to create a flow that uses data from a Dataverse table to compare to results from a SQL query and return any rows from the SQL query that contain the values from the Dataverse table.  The problem is when extra characters exist in the results from the SQL query.  I'm able to find exact matches between the two arrays, but can't figure out how to search the SQL query array that contain the substring value in Dataverse.

 

Example:

SQL Query: "ABC DEF1234"

Dataverse: "DEF1234"

 

Thanks!

Categories:
I have the same question (0)
  • Shujaath_Khan Profile Picture
    1,111 Super User 2024 Season 1 on at
    Re: How to return results from an array that contain a substring from a column in another array?

    Hi @tsnowden 

     

    while iterating over SQL rows try contains operator

    you can try the below code in composing an expression so the outcomes shall be true/false accordingly you can proceed further

     

    contains(variables('Apply_to_each')['column'],'DEF1234')

     Thanks
    Please click Accept as Solution on this reply if it helped to solve your issue, and thumbs-up if you feel this is useful or important in other ways as a boost.

  • tsnowden Profile Picture
    11 on at
    Re: How to return results from an array that contain a substring from a column in another array?

    Thanks for the prompt reply!

     

    I use the contains operator now, but I only get TRUE on exact matches, not when the value in my 2nd array matches as a substring value in the 1st array, which is what I need.

    tsnowden_3-1657056873395.png

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard