cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Community Support Team
Community Support Team

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
Community Support Team
Community Support Team

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.
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

Community Support Team
Community Support Team

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

Anonymous
Not applicable

Re: Search display in Browse Gallery

That worked! 

 

Thanks!

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,217)