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

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
v-yamao-msft
Community Support
Community Support

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

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

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

That worked! 

 

Thanks!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,902)