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

Create filtered views like Sharepoint

Hi,

 

completely new to this, so please be gentle. I have a sharepoint list that I have created an app from. All going fine except I can't get to grips with the syntax (I have no experience in this field at all). In my sharepoint list called "Job Sheet" I have 3 views that show the matching records from a dropdown, Active, Completed and Closed. This column is named "Job Status", but I must have renamed it from an existing one as it comes up in the app as IssueStatus when I look at the detail screen or edit screen.

I just wanted to either filter everything so I only show active items, or add in a dropdown that I can select any of the views.

So far I've been working along the lines of adding a checkbox that when checked would hopefully filter out anything other than items where the dropdown column shows "Active" but it just keeps complaining that the syntax is wrong.

So far I have tried this (don't laugh I've been googling for hours) Filter('Job Sheet', IssueStatus.Value="Active") and variations, bits copied from other solutions etc. but I really am missing something here.

Any help or pointing me in the direction of instructions for absolute beginners would be appreciated.

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Meneghino
Level 10

Re: Create filtered views like Sharepoint

Hi @Federal, we were all beginners once.  PowerApps works differently from anything else I used before, but once you get used to it, you can do some great things.

 

Frankly I can't see why Filter('Job Sheet', IssueStatus.Value="Active") doesn't work, seems right to me.

 

Can you please send a screenshot of where you use this code?  It should be the Items property of a gallery.  If you are trying to place this code in the dropdown properties, then that is where you are going wrong and where it will take a while to get used to how things work in PA.

 

If this is the problem, then do the following:

MyDropDown.Items =["Active", "Completed", "Closed"]

(This is just shorthand for saying that if your dropdown is called MyDropDown, then set its Items property to everything after the = sign)

 

Then do this:

MyGallery.Items = Filter('Job Sheet', IssueStatus.Value=MyDropDown.Selected.Value) 

View solution in original post

Meneghino
Level 10

Re: Create filtered views like Sharepoint

Not a nuisance, you are trying and learning.

 

Please try this:

 

SortByColumns(Search(Filter('Job Sheet', IssueStatus.Value=Dropdown1.Selected.Value), TextSearchBox1.Text, "Description"), "Job_x0020__x0023_", If(SortAscending1, Descending))

View solution in original post

8 REPLIES 8
Meneghino
Level 10

Re: Create filtered views like Sharepoint

Hi @Federal, we were all beginners once.  PowerApps works differently from anything else I used before, but once you get used to it, you can do some great things.

 

Frankly I can't see why Filter('Job Sheet', IssueStatus.Value="Active") doesn't work, seems right to me.

 

Can you please send a screenshot of where you use this code?  It should be the Items property of a gallery.  If you are trying to place this code in the dropdown properties, then that is where you are going wrong and where it will take a while to get used to how things work in PA.

 

If this is the problem, then do the following:

MyDropDown.Items =["Active", "Completed", "Closed"]

(This is just shorthand for saying that if your dropdown is called MyDropDown, then set its Items property to everything after the = sign)

 

Then do this:

MyGallery.Items = Filter('Job Sheet', IssueStatus.Value=MyDropDown.Selected.Value) 

View solution in original post

Federal
Level: Powered On

Re: Create filtered views like Sharepoint

Many thanks, I'll try to play with it again using your suggestions ASAP. If you don't hear back for a while it's because I have a manic weekend lined up and working away next week.
Federal
Level: Powered On

Re: Create filtered views like Sharepoint

Hi, thanks for the pointer. I wasn't selecting the actual item to filter on! I've used your suggestion as shown below, there is a blue highlighted section it doesn't seem to like, but it's not affecting functionality.

Filter('Job Sheet', IssueStatus.Value=Dropdown1.Selected.Value) I'll play with that as I don't like warnings and come back to you if I'm still at a loss.

 

Can I add further filters on the same line? I've seen posts on the 500 item limit which is my next hurdle and I'm guessing I can add as many arguements as I like? I'll try to figure that out on my own as I need to learn for myself, but thanks again, I was banging my head against a wall trying to figure out why it wouldn't work and you've helped steer me in the right direction.

 

Meneghino
Level 10

Re: Create filtered views like Sharepoint

hi @Federal

The blue circle warning may (but not necessarily) be an issue if you are querying a list of >500 records.

This is due to the issued of delegation, but delegation seems to be being extended regularly, so they problem may go away in the next few upgrades of PowerApps.

Yes, you can add as many filters as you like and combine with && (and) || (or) ! (not) logical operators

 

Federal
Level: Powered On

Re: Create filtered views like Sharepoint

Thanks again, I couldn't combine them last night, but I'll try again with the operators as soon as I can. Almost there now!
Federal
Level: Powered On

Re: Create filtered views like Sharepoint

Hi again, sorry to be a nuisance, but I'm struggling to combine the things I want. The initial arguement that was inserted automatically when I created the app is:

SortByColumns(Search('Job Sheet', TextSearchBox1.Text, "Description"), "Job_x0020__x0023_", If(SortAscending1, Descending)

This takes care fo the search box and the sort ascending/descending button.

 

I've tried adding && Filter('Job Sheet', IssueStatus.Value=Dropdown1.Selected.Value)) after this, inside the brackets, with and without the and and it just doesn't like it. I know it must be something simple but I'm at the stage I can't remember what I've tried and I'm just going over and over it with no success.

 

 

Meneghino
Level 10

Re: Create filtered views like Sharepoint

Not a nuisance, you are trying and learning.

 

Please try this:

 

SortByColumns(Search(Filter('Job Sheet', IssueStatus.Value=Dropdown1.Selected.Value), TextSearchBox1.Text, "Description"), "Job_x0020__x0023_", If(SortAscending1, Descending))

View solution in original post

Federal
Level: Powered On

Re: Create filtered views like Sharepoint

Thanks so much, I should have seen the Filter should have been where you show it from looking at the Search function position. Sometimes I spend too long looking at things and the obvious escapes me.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,811)