cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Search display in Browse Gallery

I'm new to this all so please bear with me,

  I've got an app based of a sharepoint list.  I used create app function in sharepoint to build the app.  In the browse gallery screen I would like the information displayed to be different than than the default that came.  

 

This is what I currently have:

 

SortByColumns(Search('Appointment Book', TextSearchBox1.Text, "Student_x0020_First_x0020_Name"), "Student_x0020_First_x0020_Name", If(SortDescending1, Descending, Ascending))

 

I want it to display results based of the "modified" column instead of the "Student_x0020_First_x0020_Name" column.  I tried just reaplacing the column name but that gave be back blank results.  I think its because the modifed column is date/time and the search function works with strings?  Will using filter work and if so how?

 

Thanks,

Matt

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Search display in Browse Gallery

Hi Mauth,

 

Thanks for updating.

 

Currently, StartsWith function can be used with Filter function to search the data within your app, please see this documentation about StartsWith function for more details:
https://powerapps.microsoft.com/en-us/tutorials/function-startswith/

 

As you are using Search function, so when you use StartsWith function with it, an “invalid argument type” error would be shown.

 

I tried to configure the code looks like below, it is displayed based on a Date/Time column, and it just works fine:
SortByColumns(Search(listF,TextSearchBox1.Text,"Title"),"date_x0020_only",If(SortDescending1,Descending,Ascending))

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Search display in Browse Gallery

Hi Matt,

 

I assumed that you replaced the “Student_x0020_First_x0020_Name” with “Modified” column by manually entering the word “modified”, am I right?
And you not only got the blank result, but also a yellow warning icon.

 

I created an app for a list in SharePoint Online, the default function it has is:
SortByColumns(Filter(Employee, StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))

 

Then I tried to replace the “Title” column with “Modified” column by manually entering the word “modified”. I got a blank result and a yellow warning icon:

2.PNG

 

Then I changed the “modified” to “Modified”, it worked, and I can sort the app by “Modified” column:

3.PNG

 

PS: When changing the column, you could delete the existing column name, then select one from the drop down menu.

4.PNG

 

Please try this on your side and let me know if it works for you.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Anonymous
Not applicable

Re: Search display in Browse Gallery

Hi Mabel Mao,

  Thank you for your assistance on this.  I'm sorry its taken me so long to get back to this, I was put on another project.  I entered your suggestion and I am still getting the error.  This time it is an invalid argumetn type.  My Modfied column is a DateTime column and the Startswith argument is looking for a text value.  What argrument should I use instead of Startswith?

 

Thanks,

Matt

Highlighted
Community Support
Community Support

Re: Search display in Browse Gallery

Hi Mauth,

 

Thanks for updating.

 

Currently, StartsWith function can be used with Filter function to search the data within your app, please see this documentation about StartsWith function for more details:
https://powerapps.microsoft.com/en-us/tutorials/function-startswith/

 

As you are using Search function, so when you use StartsWith function with it, an “invalid argument type” error would be shown.

 

I tried to configure the code looks like below, it is displayed based on a Date/Time column, and it just works fine:
SortByColumns(Search(listF,TextSearchBox1.Text,"Title"),"date_x0020_only",If(SortDescending1,Descending,Ascending))

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Search display in Browse Gallery

That worked! 

 

Thanks!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,169)