Skip to main content

Notifications

Community site session details

Community site session details

Session Id : YlI3ARxXB1YWXj9ZRDhnP/
Power Apps - Building Power Apps
Answered

Repeating Parent/Child Galleries a real humdinger!!

Like (1) ShareShare
ReportReport
Posted on 23 Sep 2024 15:19:11 by 15 Super User 2025 Season 1
@RandyHayes @WarrenBelz
 
Ok I have a humdinger or a problem.  I have a parent/nest child gallery with repeating table which work just fine, however I am using a button to add the whole thing all over again.
but when I click on the Add Org button which has this code on it
Collect(
    colOrganizations,
    Defaults(Organizations)
)
I am getting this
It is not clearing the previous selections from the first Org 
 
this is the code for the Add Task button
Set(currentOrganization, galOrganizations.Selected.Name);


Collect(
    colSubOrgs,
    {
        ID: GUID(),
        Sub_Org_Name: "",
        TaskStatusDescription: "",
        Task_Org_Status: "",
        Parent_Org_Name: currentOrganization,
        TaskManagerID:cxtManager,
        isNew: true
    }
);

and here is the code for the items of the galChildren
SortByColumns(
    Filter(
        colSubOrgs,
        Parent_Org_Name = currentOrganization
    ),
    "isNew", 
    SortOrder.Ascending,  
    "ID", 
    SortOrder.Descending  // Newest saved tasks at the top
)
I am not sure how to get this to repeat the setup but not copy the previous selections
  • Verified answer
    Dorinda Profile Picture
    15 Super User 2025 Season 1 on 24 Sep 2024 at 16:05:41
    Repeating Parent/Child Galleries a real humdinger!!
    I figured it out just needed to save the Items Property to this 

     
    SortByColumns(
        Filter(
            colSubOrgs,
            Parent_Org_Name = ThisItem.Name
        ),
        "isNew",
        SortOrder.Ascending,  
        "ID",
        SortOrder.Descending  
    )
    Changing the ThisItem.Name worked just like it was supposed to do I was over thinking it.
  • Dorinda Profile Picture
    15 Super User 2025 Season 1 on 23 Sep 2024 at 19:54:57
    Repeating Parent/Child Galleries a real humdinger!!
    If I do a clear collect it will not keep what is in the first set of Parent Org and sub org, It is saving back to the same collection how do i get around that ?
  • Michael E. Gernaey Profile Picture
    41,874 Super User 2025 Season 1 on 23 Sep 2024 at 17:07:28
    Repeating Parent/Child Galleries a real humdinger!!
    HI
     
    It's not clearing because you are doing a Collect, not a ClearCollect.
     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
MS.Ragavendar Profile Picture

MS.Ragavendar 20

#2
BCBuizer Profile Picture

BCBuizer 10 Super User 2025 Season 1

#2
LC-26081402-0 Profile Picture

LC-26081402-0 10

Overall leaderboard
Loading started