web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Compare two entries in...
Power Apps
Answered

Compare two entries in two diffrent galleries- How?

(0) ShareShare
ReportReport
Posted on by 775

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!

 

Categories:
  • Verified answer
    Dant7484 Profile Picture
    154 on at

    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 Profile Picture
    775 on at

    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!

  • Dant7484 Profile Picture
    154 on at

    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 Profile Picture
    775 on at

    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!

  • Dant7484 Profile Picture
    154 on at

    Outside.

    Have a good day 🙂

  • PowerSäm Profile Picture
    775 on at

    Thank you! You too.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard