cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jim213124
Advocate I
Advocate I

Filter by sharepoint column not working

Hello guys,

 

I created a gallery and a text input called 'TextSearchBox1'

I try to filter the gallery based on 'TextSearchBox1'

This is my code ('24/7 Client' is the database from sharepoint) and it works without any problem.

 

Filter('24/7 Client',StartsWith('First Name',TextSearchBox1.Text))

 

However, if I change 'First Name' as 'Last Name', this function stop working. There is no error message and just not working.

 

My sharepoint has 50,000 rows and i have set 'First Name' as primary index and 'Last Name' as second index, could this by the reason? What should I do if I want to search by 'Last Name'?

 

Thanks so much.

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Jim213124 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

7 REPLIES 7
Pstork1
Dual Super User
Dual Super User

The first thing I would do is look at the column definition in the List Settings.  When you edit a column it will show you the actual internal name of the column at the end of the URL.  You may not be using the actual internal name of the Last Name column in the filter.  Also since there is a space in it the actual name is probably 'Last_x0020_Name'.  The space is replaced by the hex definition of the space character.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!
WarrenBelz
Super User
Super User

Hi @Jim213124 ,

Firstly, there is no logical reason why a different indexed field would not function with the Delegable operator StartsWith(), however check the field name by going into SharePoint List Settings and hovering over Last Name - the name will be at the end of the string at the bottom of the screen.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Jim213124
Advocate I
Advocate I

I tried. The column name should be right. If I change the column to 'Last Name' and enter anything into the searchbox, filter function will return no result.

 

Thank you for your reply.

 

I did notice that when I was enter the fomula,

first name column is shown as 'First Name'

But last name column is shown as Last Name without ''

Do you know why this happens? How should I fix it

 

Thank you for your reply.

 

I did notice that when I was entering the fomula,

first name column is shown as 'First Name'

But last name column is shown as Last Name without ''

Do you know why this happens? How should I fix it

 

@Jim213124 ,

Try Last_x0020_Name

You simply need to find the name in SharePoint that you originally used to create the field.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Hi @Jim213124 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,562)