cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RJF61
Post Partisan
Post Partisan

Power Apps Filter

I am trying to establish a Filter in Power Apps for a SharePoint List.  At this point I would like the Filter to display records based on the following...

 

Records where text from Issue box startswith.  This works with "Filter('Safety Good Catch Items',StartsWith(Issue,txtIssue.Text))"

OR

Status = Selected Status Value

OR

AssignedTo = Selected Pulldown Value

 

RJF61_1-1665604417050.png

I was trying "Filter('Safety Good Catch Items',StartsWith(Issue,txtIssue.Text) || Status.Value = Radio2.Selected.Value)" but my syntax is obviously not correct.  I would appreciate any assistance.

5 REPLIES 5
WarrenBelz
Super User
Super User

Hi @RJF61 ,

The syntax is structurally correct

Filter(
   'Safety Good Catch Items',
   StartsWith(
      Issue,
      txtIssue.Text
   ) || 
   Status.Value = Radio2.Selected.Value
)

assuming Status is a Choice column and Radio2 Items are

Choices('Safety Good Catch Items'.Status)

Is this the case.

 

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.

Visit my blog Practical Power Apps

Hi @WarrenBelz

Yes, the information you provided is the case; however, when I don't enter text in the Issue and Select a Radio Button Choice, I do not receive the Filtered records.  I have also noticed that entering text in the Issue box provides some errors (with the OR's).  By itself it works fine.

Hi @RJF61 ,

Make the Default of txIssue "" (empty string) and it will not restrict if the box is empty.

 

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.

Visit my blog Practical Power Apps

Hi @WarrenBelz I did have that as the default.  I did notice that when I type "" in txtIssue, the Filter works.  Any suggestions why that would occur?  Also, with other text entry, it appears to error.

RJF61_0-1665665129989.png

 

RJF61_1-1665665303663.png

Thanks

 

Hi @RJF61 ,

Not sure on your question here, but StartsWith will always work and not filter with an empty string (everything starts with it). What is the error and code on the other one?

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,842)