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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Search function issue:...
Power Apps
Unanswered

Search function issue: Needs to search on capital as well as Proper case

(0) ShareShare
ReportReport
Posted on by 107

Hi power apps experts,

 

I have a text column with customer names, and I am performing search in this way:
Search('CustTabel', Proper(TextSearch.Text),"CustomerName")

I am using proper, as names are normally written that way. But, we also have some Company names that are written in capitals, for example "BBC ..."

How can I perform search on the same column with proper as well as upper?

Search('CustTabel', Proper(TextSearch.Text) || Upper(TextSearch.Text) ,"CustomerName")
But this doesn't work.

Thanks in advance


Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Hey @SearchingYT 

    I am not sure but I thinkt that you dont need the "UpperCase" code because I have an app and the user has names witch capital letters and others without capital letters and he can search both.

     

    Try this:
    Search(CustomTabel;TextSearch.Text;"CustomerName")


    Plus, if you use "," it will not work, now in Power Apps you need to use ";" instead of ","

     

    If this solved your problem, please mark it as a solution 🙂 

  • timl Profile Picture
    36,383 Super User 2025 Season 2 on at

    Hi @SearchingYT 

    As @Nogueira1306 says, Search typically carries out a case-insensitive search by default. Are you finding that's not the case for you? If so, what data source are you using? SQL Server?

  • SearchingYT Profile Picture
    107 on at

    Hey @Nogueira1306 
    ; and , depends on what regional language we use in power apps. In english, its stille a , between arguments.

    I need the case code because:
    If CustomerName is "Abc" and I type "abc" in my search. It does not give me a match. Hence, if I use proper it changes my "abc" to "Abc" and searches and findes a match.
    The same applies with capital letter. If CustomerName is "ABC" and I type "abc" it does not give me a match. If I use Upper it changes my "abc" to "ABC" and searches and findes a match.

    Hence, I want my search to have both capabilities.
    Or, the best solution, I want my seach function to be case insensitive...

  • SearchingYT Profile Picture
    107 on at

    Hi @timl I am using SQL, and I can confirm that search function is not case-insensitive.

  • Verified answer
    timl Profile Picture
    36,383 Super User 2025 Season 2 on at

    Hi @SearchingYT 

     

    The reason for this is most likely because your SQL Server uses a case sensitive collation.

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Search-Case-sensitive/m-p/41098

     

    The way that I would build a case insensitive search feature would be to create a SQL Server view, and to cast the target column to a data type that uses a case insensitive collation. This will work well, and will avoid the delegation problems that you could experience with other workarounds.

     

    This is the view that you would create (Latin1_General_CI_AS is case-insensitive and accent-sensitive).

     

    CREATE VIEW vwCustomerSearch
    AS
    SELECT 
    [CustomerName] COLLATE Latin1_General_CI_AS AS [CustomerName],
    [Address1],
    [Address2],
    [etc]
    FROM dbo.Customer

     

    From Power Apps, this should now carry out a case insensitive search:

    Search(vwCustomerSearch, TextSearch.Text, "CustomerName")

     

  • SearchingYT Profile Picture
    107 on at

    @timl Amazing!!! That was the issue. The solution was in the collation of my sql column. Thank you, this has helped me to really optimize searching in my app!

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard