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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Selecting gallery row ...
Power Apps
Unanswered

Selecting gallery row based on form value, updating form value if selected gallery changes

(0) ShareShare
ReportReport
Posted on by 212

Sorry for the long subject line but I did not know how to describe my issue in a few words.

 

I have a SP list of observations. Each observation can reference 1 row in a gallery. The two are linked via id. When I open the form in Edit mode, I'd like to select the row based on the id stored in the form. but the row in the gallery can change and if it changes, then I'd like to update the id in the form.

 

I've set the default in the gallery as a lookup to the id on the form and the id on the form is set to the selected row on the gallery.  And, it makes sense that this is causing a circular reference error. Any ideas on how best to resolve/implement?

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @ruth ,

    Yes, that certainly is a Circular Reference, however if you do this - OnSelect of the Gallery

    Set(gblID,ThisItem.ID)

    and the Item of the Form is 

    LookUp(
     ListName,
     ID=gblID
    )

    you can also highlight the selected item in the gallery with the TemplateFill

    If(
     ThisItem.IsSelected,
     YourHighlightColour
     White
    )

     

    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.

     

  • ruth Profile Picture
    212 on at

    Hi Warren,

     

    Thanks for the response. The challenge is that I do not want the selected id from the gallery to drive the contents of the form but rather I'd like for it to work with my combo box.  The gallery has a list of other helpful information that I cannot put into the combobox.

     

    I am able to "highlight" the row in the gallery based on the value I select in the combo box, but I cannot change the contents of the combo box based on a row selected in the gallery (as this is where the circular reference occurs).

  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    @ruth ,

    I am still a little unclear exactly what you want to do, but you cannot refer a control to itself, two controls to each other or have a "circle" of references. Can you please explain in a bit more detail exactly the result you want to achieve.

  • ruth Profile Picture
    212 on at

    @WarrenBelz , I think you've answered my question, but to be sure, I'll explain a little more. I have a combo box in a form that stores an id from another Sharepoint list. I display the "other list" on the screen as a gallery. When a user selects the item from the combo box, the row in the "other list" is highlighted. This works perfectly. I was hoping to be able to allow the user to select a row from the "other list" and when they did, populate the combo box with that selected value.

  • Verified answer
    WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @ruth ,

    Not really possible from what I understand from your description - it is still circular.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard