cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jim213124
Frequent Visitor

Desperately need help! Powerapp filter function doesn't work on one of my sharepoint columns

Hello,

 

I have a sharepoint dataset with many columns, 

I try to add a text input to filter the gallery.

 

The filter function works fine if I use:

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

 

However the filter function return zero result if replace first name with last name:

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

 

It shows no error at all. I also used the 'Last Name' in card and it works fine:

"Client Name: " & ThisItem.'First Name' & ThisItem.'Last Name'

 

I have checked the sharepoint settings. Both are set as single line text.

 

Anyone has a idea why this is happening?

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@Jim213124 

Make sure you are using the right name.  When you use that formula, you need to specify the column name as it is in SharePoint.  

First, your column name should have double quotes around it:

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

 

Next, try Filter('24/7 Client',StartsWith("Last_x0020_Name",TextSearchBox1.Text))

If that yields no results, the next question would be, was this originally the Title column?  If so, then try:

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

 

Still no joy? Then go into your SharePoint list settings, click on Last Name to review the column definition, then look at the URL - you will see the real name of the field there.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

2 REPLIES 2
RandyHayes
Super User III
Super User III

@Jim213124 

Make sure you are using the right name.  When you use that formula, you need to specify the column name as it is in SharePoint.  

First, your column name should have double quotes around it:

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

 

Next, try Filter('24/7 Client',StartsWith("Last_x0020_Name",TextSearchBox1.Text))

If that yields no results, the next question would be, was this originally the Title column?  If so, then try:

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

 

Still no joy? Then go into your SharePoint list settings, click on Last Name to review the column definition, then look at the URL - you will see the real name of the field there.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Jim213124
Frequent Visitor

It turns out that my 'last name' column has a space in the beginning. This causes the startwith function stop working. Stupid mistake.

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (45,967)