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

Re: PowerApps Formula Question: Filter Gallery by Current User combined with text input keyword search

Thank you for the advice. I'll look more into Collections and Patching tomorrow and let you know how it works out. I really appreciate you taking time out of your busy day to try to help me.

Highlighted
tagustin2020
Level: Powered On

Re: PowerApps Formula Question: Filter Gallery by Current User combined with text input keyword search

Hello Eelman,

 

I really appreciate your advice, but being a newbie I'm afraid I need some more advice despite watching numerous tutorials from Audrie, Shane and Laura to figure out how to apply Collection principles to my particular situation.

 

One thing I haven't seen covered in the tutorials is how to create as you say a Display Collection from the Original. Can you explain that part please? I don't see a "Save As" type functionality so I'm not quite sure how to do that. Also, you mention using result when using the Distinct function, but I don't see the Distinct function specifically mentioned in the formulas you so kindly provided, just the word "result". Can you explain that part as well?

 

Lastly, new request data will be added to the SharePoint site via a form in the app. How do I make sure the Collection is automatically refreshed so the data they see in the gallery is always current?

 

Thanks again. I'm so grateful for your help.

 

Kind regards,

Teresa

 

Eelman
Level 10

Re: PowerApps Formula Question: Filter Gallery by Current User combined with text input keyword search

@tagustin2020 

I've been working on a similar solution for one of my apps and I think this may fix your issue? On the Items property of your Gallery add this code:

 

Filter(‘Tool Design Support Request’, ’Creator Email’ = varUser.Email &&

If(!IsBlank(Dropdown1.Selected.Result), Status.Value= Dropdown1.Selected.Result,true))

 

- you may need to correct some syntax errors ... I usually rely on PowerApps to correct me lol

- this code may also give you a delegation warning but should still work?

I may have confused the issue with my collections explanation, my apologies. But to explain a little, I use collections (sometimes) like this.

 

Datasource --> colOriginal

ClearCollect(colGallery, Filter(colOriginal, myFilterCriteria))

my gallery displays colGallery

 

If I want to run a 2nd filter/dropdown

ClearCollect(colGallery, colOriginal); ClearCollect(colGallery, Filter(colOriginal, my_2nd_FilterCriteria))

I'll then use colGallery in other parts of my app.

 

If you are just filtering then the top solution should work but if you need data for other things then 2 collections may work?

 

Hope this helps

tagustin2020
Level: Powered On

Re: PowerApps Formula Question: Filter Gallery by Current User combined with text input keyword search

Thank you. I will give this a try today. In regards to my question about how to keep the Collection and SharePoint list in sync, I came across a reference to the Refresh function yesterday after I sent you the question. Is that what you would recommend, or something else?

 

Teresa

Eelman
Level 10

Re: PowerApps Formula Question: Filter Gallery by Current User combined with text input keyword search

@tagustin2020 Let me know if that code works, I'd like to know if it did ... means I kinda know what I'm doing, haha

 

Re: Refresh(), I am yet to use this function in my apps. Reading the docs seems the refresh would need to be manually operated eg OnChange, OnSelect, a Button/Icon, etc. I'd try to use it if I was building apps like yours, why not.

 

My app builds sound quite different to yours? Seems you may always have good internet access / bandwidth where direct update to and update from your main data sources won't be a big deal. My users range from internet access that is good/metered/non-existent, hence why I build using collections.

tagustin2020
Level: Powered On

Re: PowerApps Formula Question: Filter Gallery by Current User combined with text input keyword search

Thanks for the thoughts on Refresh. I was planning to use it with a button so I'll do some testing and see if it works.  The filter formula you suggested worked well for the Status drop down, but I have one more component I need to figure out. I would like all items to show by default regardless of status. Since my Choice dropdown defaults to Open, only the Open requests show by default. Let me know if you have any ideas of what I could add to the formula to achieve that.

 

I watched a Laura Rogers video on how to sort collection columns with drop downs over each column that default to All so I'm going to try that next. I'm still trying to get my head wrapped around how to do Collections. I've watched so many videos at this point, I think I have a bit of information overload. Thanks for your advice about using 2 Collections to achieve what I want to do with Filter and Sort.

 

Here are the links to Laura's videos in case anyone wants to check them out:

PowerApps Sorting- https://www.youtube.com/watch?v=vyBsk7-1Mxk&t=1953s

PowerApps Custom Filtering- https://www.youtube.com/watch?v=5wfSAsU93b4

 

Thanks again for your help,

Teresa

 

Eelman
Level 10

Re: PowerApps Formula Question: Filter Gallery by Current User combined with text input keyword search

@tagustin2020 

Teresa,

On your dropdown, try setting the 'AllowEmptySelection' property to true and clearing out the 'Default' property ie it should show nothing. You may need to Save --> Exit app to get this to work properly? I think that should show all items and also give users the option to select blanks?

 

However, if 'Choices' is a Sharepoint Choices field this may not work, not sure?

 

The Sorting video idea looks great, might try it in some future apps.

 

Cheers

tagustin2020
Level: Powered On

Re: PowerApps Formula Question: Filter Gallery by Current User combined with text input keyword search

Thank you for the advice. I haven't been able to work on my app today, but will give it a try over the weekend and let you know how it works out. Have a great weekend! Teresa

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (3,644)