I am building an app and on one screen, i have Three Gallery lists on the screen. Screen No.1 is populated with UserName and UserID. Clicking on any data line of the Gallery No.1 populates the related data from database into the textboxes and dropdowns on that page. I want to Populate the Gallary list No.2 and 3 to be populated based on the UserID of Gallery List No.1 like rest of the text boxes and dropdowns.
The code is in the Default. Just to make it clear, I have a username and userid on one Gallery List and I want to Populate the Properties related to the UserID in the 2nd list. For Example User with a UserID 1, all the properties related to the UserID 1 should be populated into the Gallery List 2. The data is saved into SQL Azure Database.
Can anyone help please ? Thank you.
Solved! Go to Solution.
Thank you for the response. Unfortunately the suggested solution will not work. In terms of SQL Query, It is something like this what I want to do
Select UserProperties from dbo.User_B_Tab where UserID=1001
So all the user properties of a user which is Selected in Gallery List 1 should be populated in Gallery List 2 based on the UserID. I do not know the PowerApp syntax if i have to do this.
I have tried using the following
LookUp( '[dbo].[User_B_Tab]', UserID=UserModGallery_List.Selected.UserID,UserProperties )
I think this will search for the matching UserID and will return the UserProperties against the UserID. I am getting an error
I am not sure if using Lookup will work in Default value of the GalleryList2. Can you help please ?
Resolved the issue following your guidelines. i was actually making it too complicated because of my developers background, PowerApps is different 😉
I simply used the user table as a datasource for the Gallery List 2, In the Items property of the Gallery List, I used the following code
Filter( '[dbo].[User_B_Tab]', UserID = UserModGallery_List.Selected.UserID )
And in the Gallery List 2, I added a Label, and in the Text property, I have simply called the UserProperties, and it works like a charm. Thank you
Check it out!
Check out whats happening in Power Apps
FIll out a quick form to claim your community user group member badge today!
Features releasing from October 2020 through March 2021