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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Build search tokens fr...
Power Apps
Unanswered

Build search tokens from a text string and search a field in a table in sql server

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

What I have: sql server database(dbData) , sql server Table(tblDescriptionData) and field(fld_SearchData)

 

I have a textbox (txt_SearchToken)  that after a persons has entered the text i need to split the string into individual tokens and then search the field  fld_SearchData ?

 

i.e.  BLACK PIPE 3/4 

so the search will be looking for  "BLACK"  "PIPE" "3/4"

 

Is this possible ?

 

Thanks

dAVE

Categories:
  • RodCha Profile Picture
    216 on at

    If you use 'Search' function, I think it doesn't matter where the word is located, try this:

    SortByColumns(Search(tblDescriptionData, Text_Input.Text, "fld_SearchData"), "fld_SearchData", Ascending)

     

    or if you need to filter it:

    SortByColumns(Search(Filter(tblDescriptionData, "Column" = "Specific Value"), Text_Input.Text, "fld_SearchData"), "fld_SearchData", Ascending)

     

    I added the 'SortByColumns', bc it make it easier for people when searching something. You can remove it if you don't need it:

    • Search(tblDescriptionData, Text_Input.Text, "fld_SearchData")

    • Search(Filter(tblDescriptionData, "Column" = "Specific Value"), Text_Input.Text, "fld_SearchData")

  • SagarVIS96 Profile Picture
    212 on at

    Hey
    @Anonymous ,

    Based on the problem which you have mentioned I have one solution which might work for you. You can try the following code:

    Filter(
     tblDescriptionData,
     If(
     IsBlank(TextInput2.Text),
     true,
     fld_SearchData in Split(
     TextInput2.Text,
     " "
     )
     )
    )

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard