Hello, everyone.
I am brand new to PowerApps, and I am struggling with my first app.
The goal is essentially to have a personalized user home page with links to various "Favorites" that the user chooses from a list.
What I have done is created 2 SharePoint lists:
TestAppsList: holds a list of information about applications (App name, web link, icon, etc.)
UserApps: holds the information about a particular user's preference to have the app as a favorite. (User email, App name, preference(boolean), and a column to identify each record by app and user(concatenated user email and app name))
What I am trying to do is have 2 galleries.
Gallery1: Shows a list of all of the apps in the TestAppsList
Gallery2: Shows a list of all of the apps in the TestAppsList where the user has marked the app as a favorite (In UserApps: preference=true)
I am using a toggle in Gallery1 to set the prefence value in UserApps
I cannot get Gallery2 to only show the values that are "favorites".
I have tried many things that did not work, but the closest I got was:
(in the Items field for Gallery2)
Filter(TestAppList, TextInput1.Text in ShowColumns(Filter('UserApps', Favorite = 1), "UserApp").UserApp)
For some reason, this is still showing all of the apps in the list, instead of only the "favorited" ones
I also tried Filter(TestAppList, If(Toggle1.Value = true , StartsWith(Title, Title1.Text))), but this only shows the last item that was toggled.
Any help would be very much appreciated.
Solved! Go to Solution.
Can you explain a little more on Gallery2 - you state listing all of the apps in the TestAppsList.
Are you stating that only the apps that are marked as favorites should appear?
If so, your formula for the Items property should be the following:
Filter(TestAppList, AppName in Filter('UserApps', Favorite && UserEmail = User().Email).AppName)
In this formula we are filtering the favorite apps from the UserApps list where Favorite is true AND (&&) the Email in the list is equal to the current user email. This filtered table is then used to "feed" the Filter on the TestAppList which will compare if AppName is in the inner filter.
I hope that is what you are looking for. If not, post back and we'll expand from there.
Can you explain a little more on Gallery2 - you state listing all of the apps in the TestAppsList.
Are you stating that only the apps that are marked as favorites should appear?
If so, your formula for the Items property should be the following:
Filter(TestAppList, AppName in Filter('UserApps', Favorite && UserEmail = User().Email).AppName)
In this formula we are filtering the favorite apps from the UserApps list where Favorite is true AND (&&) the Email in the list is equal to the current user email. This filtered table is then used to "feed" the Filter on the TestAppList which will compare if AppName is in the inner filter.
I hope that is what you are looking for. If not, post back and we'll expand from there.
Hi, Randy.
Yes, Gallery2 should only show the apps that the user has marked as a favorite. Your formula did the trick. Thanks so much!
I think the problem was that I was approaching it from a database mindset. I was trying to use a concatenated field (User email and AppName) as a primary key to identify the record in the UserApps list. Then I created a hidden text box that held the concatenated value, and tried to use that to lookup the value in the UserApps list, instead of just using the user's email.
This is the working formula (slightly modified with actual column names):
Filter(TestAppList, Title in Filter('UserApps', Favorite && User = User().Email).AppName)
Thanks again.
Looks good! Glad you were able to get it working.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
214 | |
205 | |
86 | |
58 | |
38 |