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 / Function Search has in...
Power Apps
Unanswered

Function Search has invalid arguments

(0) ShareShare
ReportReport
Posted on by 2

Hi,

 

I am new to powerapps and cannot really understand what is going on. I have a default EditForm that is connected to a dataverse table Customers. The column WaitingLocation uses an option set list and this column is added to the EditForm.

 

I have changed the Items property of the dropbox to the following, because i want to display the current waiting customers for each location:

 

AddColumns(Choices(WaitingLocations);'Waiting customers';$"Waiting customers: {CountIf(Customers; CustomerState = [@CustomerState].Waiting And WaitingLocation = Value)}")

 

 

Everything works fine but when the SearchField property of the Combobox is set to "Value", the error "Function Search has invalid arguments" pops up. When I set it to "Waiting customers", the designer is happy.

 

Why is that? When i just use Choices(WaitingLocations) as Items, it also works.

Categories:
  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    hi @elbi ,

    try this

    AddColumns(
     Choices(WaitingLocations);
     "WaitingCustomers";
     CountIf(Customers, CustomerState = [@CustomerState].Waiting And WaitingLocation = Value)
     )
  • elbi Profile Picture
    2 on at

    Hi @anandm08 ,

    Then I get the error "table has not columns of type text".
    Like I said: everything works with my code.

    But I get this strange error and I assume thats some sort of bug in PowerApps. When using just Choices(WaitingLocations), I can use "Value" as SearchField with no error. When using AddColumns like above, the designer is mad at me.

     

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 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard