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 / Search function on a C...
Power Apps
Answered

Search function on a CDS research field

(0) ShareShare
ReportReport
Posted on by 230

Hi, I have an issue with the search() function.

 

I want to use the search function based of the culumn of a CDS entity.

 

For example I want to have all the users ("User" entity) witch are based in a specific country using a (custom)  field named "Based_on_Country" witch is related to the country "entity"

 

So I made this function:

Search(User;"England";'Based_on_Country'.Name)

 

There is an error telling me that search() function is waiting for a text value.

In CDS the culumn Name of the Country entity is a text. I tried to use the text() function with Text(Based_on_Country'.Name) but I have another error on the text() function.

 

I don't know what to do...

Can someone help me ?

 

Kind regards

Categories:
I have the same question (0)
  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Can you try something like?

    Search(AddColumns(Users, "CountryName", Based_on_Country.Name), "England", "CountryName")

    or

    Search(AddColumns(Users, "CountryName", Text(Based_on_Country.Name)), "England", "CountryName")

    Let me know if either one works.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit Bhatia
    https://www.thepoweraddict.com
  • Kesh Profile Picture
    230 on at

    Thank you it works perfectly without the text() function.

    Kind regards

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Glad I could help! Good luck with the rest of the app! Feel free to reach out in case of any questions!

    Thanks,
    Hardit Bhatia
    https://thepoweraddict.com

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard