cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerSäm
Continued Contributor
Continued Contributor

Compare two entries in two diffrent galleries- How?

Hello everyone,

 

I have the following request, I hope I can explain it clearly enough...

 

I have two galleries ("VorgaengeGallery" & "Gallery1") and I want to "connect" them.

 

I want that when I click on the red pfd-symbol (the entry in the VorgaengeGallery has in this case the ID=56), that in the second Gallery (Gallery1) he must search for the entry that also has at "ID der Dienstreise=56" and must select it.

 

Again: If I click on the pdf icon in one gallery, he should click on the request in the other gallery with the same number/ID under "ID der Dienstreise". Surely this works with the lookup formula because I have to compare the two galleries and say if both are the same then do this and this, but how do I do that?


For a better understanding see the image below.

 

PowerSm_0-1645449334470.png

 

It is very important that I get this right, do you understand what I mean? Otherwise feel free to ask.

 

Thank you so much in advance!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dant7484
Resolver II
Resolver II

Hi, try this:

 

VorgaengeGallery.OnSelect = Set(_selectedEntry,LookUp(Gallery1Source, ID der Dienstreise=ThisItem.ID))

 

Then in Gallery1.Default = _selectedEntry

 

So whenever you click on an entry from VorgaengeGallery the corresponding entry in Gallery1 is selected. Hope this helped.

 

View solution in original post

6 REPLIES 6
Dant7484
Resolver II
Resolver II

Hi, try this:

 

VorgaengeGallery.OnSelect = Set(_selectedEntry,LookUp(Gallery1Source, ID der Dienstreise=ThisItem.ID))

 

Then in Gallery1.Default = _selectedEntry

 

So whenever you click on an entry from VorgaengeGallery the corresponding entry in Gallery1 is selected. Hope this helped.

 

PowerSäm
Continued Contributor
Continued Contributor

Hi @Dant7484 and thank you so much for your reply!

 

That works partially. If I click on it, only the correct entry is displayed, that fits already but the item is not selected, I must then click manually on it so that also the action behind it is executed. really strange... Do you know why?

PowerSm_0-1645459229708.png

 

When I click on the entry I am redirected to another page, but this does not happen when I click on the red PDF button. The entry is compared correctly but I am not sent to the second page until I manually click on the entry.... Why this?

 

Thank you in advance!

Hi, no problem. Sorry I didn't realize it because I got the value selected when I tested it but the problem is the OnSelect doesn't trigger so just add Select(Gallery1) at the end of Set() above.

hope this helps.

PowerSäm
Continued Contributor
Continued Contributor

Thank you for your reply, @Dant7484 .

Should I insert the Select(Gallery1) inside the Set() function or outside like this: Set(); Select(Gallery1)?

 

Thnak you so much!

Outside.

Have a good day 🙂

PowerSäm
Continued Contributor
Continued Contributor

Thank you! You too.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (4,973)