cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate III
Advocate III

Error in Search Function

Hi,

 

I have the following scenraio:

SharePoint List Name: Filing List

Columns: 

  1. File Number
  2. Client
  3. Lawyer
  4. Case Number

By default, the search bar only searches in the 1st cloumn, which in my case is File Number. I would like to change the default Search field to search in all my List columns. 

 

I tried the following formula: Search('Filing List',"", "Client") but ending up in the following error:

 

error.jpg

 

Can someone please advise what I am doing wrong?

 

Thanks

Priscilla

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Error in Search Function

You grabbed exactly the right image.

If you look at the top of your screenshot, you see that the formula is setting the Items property of the gallery.

This is the formula you want to change.

You can see that all you need to do is add another StartsWith using the other column you want to search in and linking them with the or operator ||

Please have a go yourself, and if you do not manage please post back but copy paste the current text so I can edit it.

Also, have a look here, third example from the end:

https://powerapps.microsoft.com/en-us/tutorials/function-startswith/

 

View solution in original post

9 REPLIES 9
Highlighted
Community Champion
Community Champion

Re: Error in Search Function

Hi @Pripri804

You are told that the "Client" column does not exist.  SharePoint may have another internal name for that column.

You can easily test that by creating a label and starting to type: First('Filing List').

Once you type the . after the ) you should get a list of column names.

 

Highlighted
Advocate III
Advocate III

Re: Error in Search Function

Hi,

 

Yes in fact Powerapps is recognising the column as 'oxbf'. However, when i put that in the formula, the following error pops up

 

error2.jpg

Highlighted
Anonymous
Not applicable

Re: Error in Search Function

Hi Propro804, 

 

It seems you are trying to execute the search function directly on the SharePoint data? That will not work since search is not a delegable function for SharePoint. That means that you cannot execute the search function directly on SharePoint data from within the PowerApp. 

Depending on how your PowerApp is setup and what you are trying to achieve there are workarounds. For example: Collect the data of the list in a collection within the PowerApp and use that as your data source. 

 

More info about delegation and which functions are delegable for which data source you can find here:

https://powerapps.microsoft.com/en-us/tutorials/delegation-overview/

https://powerapps.microsoft.com/en-us/tutorials/delegation-list/

 

Highlighted
Community Champion
Community Champion

Re: Error in Search Function

Hi @Pripri804

 

@Anonymousaddressed the first part of the error (the suggestion piece), which is actually not an error but just a suggestion in case your list has >500 rows.

 

However, there is a second part and it is the real error. It is clearly explained: "The property expects Text values, but this rule (i.e. formula) produces incompatible Table values"

 

What property are you placing this formula in?  What is it you are trying to do?

Highlighted
Advocate III
Advocate III

Re: Error in Search Function

@Meneghino@Anonymous

 

My apologies if I did not make my self clear.

 

So, i have this list:

 

list.jpg

 

and i have created an app directly from SharePoint. The app created 3 default screens. In the Browse Screen, there is a search bar at the top. However, when i try to search from it, it only searches in the 'File Number' column, which is the title column created in SharePoint. I would like it that it can search in the other columns too.

 

This is the current search experience:

 

search.jpg

 

The app will also have the option to allow the user to insert new data (which will be written eventually in the SharePoint List)

 

 

Hope I managed to make myself clearer.

 

Thanks a lot for your help

Highlighted
Community Champion
Community Champion

Re: Error in Search Function

Hi @Pripri804

Thanks for clarifying.  You need to edit the Items propery of the gallery.

What is the current value of the Items property?

Highlighted
Advocate III
Advocate III

Re: Error in Search Function

Apologies for my idiotness 🙂 Don't know what you're exactly after, so I grabbed a screenshot of the whole thing

 

app.jpg

Highlighted
Community Champion
Community Champion

Re: Error in Search Function

You grabbed exactly the right image.

If you look at the top of your screenshot, you see that the formula is setting the Items property of the gallery.

This is the formula you want to change.

You can see that all you need to do is add another StartsWith using the other column you want to search in and linking them with the or operator ||

Please have a go yourself, and if you do not manage please post back but copy paste the current text so I can edit it.

Also, have a look here, third example from the end:

https://powerapps.microsoft.com/en-us/tutorials/function-startswith/

 

View solution in original post

Highlighted
Advocate III
Advocate III

Re: Error in Search Function

Thanks so much !! it worked smoothly.

 

My brain was stuck on adjusting the properties of the search bar, and not of the gallery.

 

Thanks again !!

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (6,212)