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.
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.
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
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?
@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.
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,
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.
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
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand