cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Daniel_C
Level: Powered On

Filter Gallery based on SharePoint list value

Hi,

 

I have a gallery that's linked to a sharepoint list('Secure Score List'). This list has a column that contains a numerical value('Current Secure Score').

 

I can filter the gallery for all items that equal a certain ammount e.g.

Filter('Secure Score List', 'Current Secure Score'=76)

This will populate the gallery with all clients that have a secure score equal to 76.

 

If I change this to a < or >, the logic breaks and returns nothing e.g.

Filter('Secure Score List', 'Current Secure Score'<76)

This returns nothing.


According to https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup and the example they use, Filter( IceCream, OnOrder > 0 ), this should work. Unless I'm missing something basic?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Filter Gallery based on SharePoint list value

HI @Daniel_C 

 

Can you please verify that the data type of your SP list column is Number, it might be possible that it is a single line text and contains numbers inside it.  You can use the below expression to convert string to a Number and then compare:
Filter('Secure Score List',Value('Current Secure Score')<50)
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
3 REPLIES 3
Super User
Super User

Re: Filter Gallery based on SharePoint list value

HI @Daniel_C 

 

Can you please verify that the data type of your SP list column is Number, it might be possible that it is a single line text and contains numbers inside it.  You can use the below expression to convert string to a Number and then compare:
Filter('Secure Score List',Value('Current Secure Score')<50)
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Daniel_C
Level: Powered On

Re: Filter Gallery based on SharePoint list value

Hey @yashag2255,

 

Thanks, that fixed it. That it worked for =76 and not ="76" threw me.

 

Regards,

Dan

Super User
Super User

Re: Filter Gallery based on SharePoint list value

Hi @Daniel_C 

 

Glad that it worked!

 

"76" threw up an error because it is of type string, but the result returned by Value() function is of type number, hence there was a mismatch. So whenever you want to compare something with value() function, it needs to be a number.
 
Hope this Helps!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 177 members 4,677 guests
Please welcome our newest community members: