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 / Unable to connect nest...
Power Apps
Unanswered

Unable to connect nested/sub-gallery from two SharePoint List

(0) ShareShare
ReportReport
Posted on by 367

Hi all - 

 

I am trying to created a nested gallery from two SharePoint list using common column "DrugName".

My second table uses a Lookup column from the parent table. 

Bunly11_0-1604731122268.png

I have watched several YouTube videos but have not been successful connecting the two.  I tried

Bunly11_1-1604731265068.png 

But I get this error

Bunly11_2-1604731327974.png

 

Thank you

 

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Bunly11 :

    As the issue shows,this rule creates a circular referecne.

    Once any controls uses it's own output to affect it's own data source,it will trigger a circular reference.

    I’m not sure why you want to reference ‘Gallery1.Selected.DrugName’ from outside, usually I apply “ThisItem.DrugName” from inside.For emxample:

     

    Filter(YourDataSource,DrugName=ThisItem.DrugName)

     

    If you insist on using Gallery1.Selected.DrugName, then you need to use variables:

    1\Add an arrow icon into Gallery1 and set it's items property to:

     

    Set(TheVar,Gallery1.Selected.DrugName) /*TheVar is my custom variable*/

    2\Set Gallery6's items property to

    Filter(YourDataSource,DrugName=TheVar)

    Best Regards,

    Bof

     

  • Bunly11 Profile Picture
    367 on at

    Hi @v-bofeng-msft 

     

    I actually would be open to suggestions. I have been using gallery1.selected because that is what I learned watching Youtube videos and reading blogs. I have other galleries connected to Gallery1.Selected and do not know how to change.

     

    I attempted to modify my code but get this error below. I use a searchbox so the user can select a drug and then they use the arrow icon to select the drug record. 

    Bunly11_0-1604897368261.png

     

     

     

    With({TBL:DrugTBL},Search(Sort(Filter(TBL,DrugName=ThisItem.DrugName, PageNumber<=300),PageNumber,If(SortDescending1,Descending,Ascending)),SearchBox.Text,"DrugName"))

     

     

     

    I also tried to use "TheVar" and I got this error in Gallery6

    Bunly11_0-1604899465474.png

    Any suggesstions on how to fix this?

     

    Thanks you

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Bunly11 :

    Could you tell me:

    • What is Gallery1's items property?
    • What propertyof the control is this formula in?

     

    With({TBL:DrugTBL},Search(Sort(Filter(TBL,DrugName=ThisItem.DrugName, PageNumber<=300),PageNumber,If(SortDescending1,Descending,Ascending)),SearchBox.Text,"DrugName"))

     

    Note: ThisItem.DrugName calls the value of the superior Gallery, so it can only be used in Gallery6

    • What is DrugTBL?
    • What is the data type of DrugName in QuickReference? It does not seem to be of text type.
    • Could you show more details?

    Best Regards,

    Bof

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard