cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simms7400
Post Prodigy
Post Prodigy

Gallery based on Lookup function?

Hi Folks -

 

I have a need to include a non-editable gallery on one of my forms.  For instance, from previous form selections, the end user will end up at the form I am talking about now.  In a text field, will be a value (from a previous gallery selection)

I need the new gallery to use that value on the underlying table and return all values in a certain column.

 

Here is a picture of the form:

2019-04-11_10-48-37.png

 

The underlying looks like this:

ptp.png

 

Therefore, I need all values from "AssetID" column displayed in the gallery.  How would I go about doing this? Would a lookup function work? I've tried but can't seem to get it to work.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

@simms7400 

Is that picture of the table your rdPartnerAssets datasource?

If so, then just change the two labels in your gallery.  The first one to ThisItem.Associated_Element and the second one to ThisItem.Associated_Alias

 

That should give you what you want.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

10 REPLIES 10
RandyHayes
Super User
Super User

@simms7400 

You will need to use the Filter function in your Gallery Items property.

   Filter(yourDataSource, Partnership=yourDataCardControl.Text)

Or if it's coming from another Gallery selection, you could use that also:

   Filter(yourDataSource, Partnership=yourGallery.Selected.PartnershipOrWhateverNameItIsThere)

 

I hope this helps you some.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes  thank you so much!!! That worked like a charm!!

 

One additional peice is the "Title" box of my gallery is populating with the data value as in the text box above, which is redudnant.  I would prefer to populate it with the Alias of the element in the Subtitle box.  However, the "Alias" value does not exist in the data source that the Gallery is using.

 

partnershipLink.png

 

It exists in "rdInvestments".  I've tried this formula but it's  for some reason recognizing the table, but the column I need rdInvestments. I'm placinf this formula in the "Text" box underneath hte DATA heading in Advanced.

 

LookUp(rdInvestments, InvestmentId=Subtitle2.Selected.AssetID,InvestmentAlias)

For clarity, Title2 is populated with the "AssetID" column from rdPartAssets.

 

Can you let me know what I'm missin? Thank you!

 

 

 

@simms7400 

Try using this formula instead on the Text of the Title2 Label control:

LookUp(rdInvestments, InvestmentId=ThisItem.AssetID).InvestmentAlias

As long as the InvestmentId is in fact the same ID as the AssetID, this should work for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes  Hi Randy -

 

I jsut tried your suggestion and for some reason, it's not recognizing the "InvestmentId" column in rdInvestments. This is weird because it's recognizing the table name... hmmmm

@simms7400 

Check spellings and case.  If that column exists in the DataSource, it should appear there as you type.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

 

Thank you, Randy. I will check it out.

 

Also, can this dropdown box be searchable? Or would I need to establish a combo boxinstead?

 

@simms7400 

DropDown controls do not have a search ability.  Use a ComboBox for that function.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes  ah yes, I figured.  SO i went ahead and recongfigured to use the combo box. Works like a charm!

 

However, I do have one issue. My gallery isn't populating with what I want it to.

Here is how it is configured now (note "Title" is Partnership in my screen shot of my table):

gallery.png

 

And here is my table:

table.png

 

I would like my gallery to be populate with "Associated_Element" & "Associated_Alias" instead. 

When I try to put "Associated_Element" in my formula in the Items box, it validates but nothing populates.  Any ideas?

 

Thanks!

@simms7400 

Is that picture of the table your rdPartnerAssets datasource?

If so, then just change the two labels in your gallery.  The first one to ThisItem.Associated_Element and the second one to ThisItem.Associated_Alias

 

That should give you what you want.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,556)