Hi, I am trying to define a variable so that when you select an item from the gallery it will fill in all the fields related to this gallery. I only have experience with drop downs for creating variables. To test the connection between the data from my MS list and the power app, I used a drop down. The gallery is also populated with data from the list. I would like to define my variable as the selected list item. So something like Set(TechVar ,LookUp('Technology Register_1',Title = ThisItem.Title.Selected.Value)) but this won't work. TechVar (my variable) was previously defined for choosing from the drop down but instead of selecting my item from the drop down, I would like to select from the gallery instead.
Any help would be greatly appreciated, Thank you in advance
Hi @Anonymous ,
You do not need all of that
Set(
TechVar,
ThisItem
);
Navigate(HOMEscreen)
or you can use this if you selection sources have different field content on the same list.
Set(
TechVar,
LookUp(
'Technology Register_1'
ID = ThisItem.ID
)
);
Navigate(HOMEscreen)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
Hi @WarrenBelz
I have got rid of the dropdown, this is the code from my gallery. This works partly as it succesfully allows me to navigate, however he variable isn't defined correctly as I can't use this variable to populate fields
Set(TechVar ,LookUp('Technology Register_1',Name =ThisItem.IsSelected))& Navigate(HOMEscreen)
Hi @Anonymous ,
The easiest way to explain is just to post the Items of both the gallery and combo box.
Hi @WarrenBelz I'm not 100% sure of the meaning of full field content, so I will describe what's in the gallery, so I individually added items to the gallery rather than making a table as I only had to put a few things in. The gallery contains values for every row of the selected columns: ie. i chose to display the image column, title column, status column. To do this (for the status column for example), I used the code:
ThisItem.Status.Value
I'm not sure if my explanation initially was clear enough, so I will restate my aim. I would like clicking on the Technology Name in the gallery to do the same thing as the dropdown - ie to look up the information related to that Technology in the MS list and display it all on the related screens
@Anonymous ,
Then assuming the Items of your gallery are based on the full field content 'Technology Register_1', (you have not used Add/Show/RemoveColumns ) the code I supplied last
Set(
TechVar,
ThisItem
)
should set the same value from your gallery.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
Set(TechvVar,LookUp('Technology Register_1',Title= Dropdown1.Selected.Value))
@WarrenBelz this is how i defined the variable when i had the dropdown
@Anonymous ,
What you have not posted is how you set the Variable for the drop-down - I was guessing it was a single value. If you want the whole selected record from the gallery
Set(
TechVar,
ThisItem
)
The proviso here though it that the Items of the Gallery and Combo Box contain the exact Table structure - if not you will get an error on this.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
Hi @WarrenBelz this isn't working. So when I had the dropdown, it displayed a list of all of the Title values from my MS list. These values are all present in the gallery. When the user clicks on the title from the gallery, I would like this open another screen, and fill in values. With the dropdown, I was able to fill in the values, but I would like to select a gallery item instead of using the dropdown
Hi @Anonymous ,
I am suspecting you are setting the Variable from your drop-down to a single text value - if form the Gallery, you just need
Set(
TechVar,
ThisItem.YourFieldName
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2