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 / ForAll AddColumns to a...
Power Apps
Unanswered

ForAll AddColumns to a collection

(0) ShareShare
ReportReport
Posted on by 32

Hi 

Im trying to add columns to a collection.

 

I have a ForAll that loops through a SharePoint list getting group ids, this in turn populates a UsersList collection from all the members of each group. I want to add 2 columns to the collection to say which Group & Establishment they are from.

 

I have:-

 

 

ForAll(Office365StaffGroups,
 Collect(UsersList,Office365Groups.ListGroupMembers(ThisRecord.StaffGroupID).value)
// I guess I need to add this somewhere, AddColumns({GroupName:ThisRecord.StaffGroupName, GroupEstab:ThisRecord.StaffGroupEstab})
)

 

 

  I have tried different combinations,

or do I have to do another forAll within to loop through the UsersList Collection adding the columns

 

Thanks 

Categories:
I have the same question (0)
  • Verified answer
    ajl80 Profile Picture
    32 on at

    sorted thanks to @RusselThomas

    ForAll(Office365StaffGroups As groupRecord, //each record will be accessible via this variable Collect(UsersList, AddColumns(Office365Groups.ListGroupMembers(groupRecord.id).value, "groupID", groupRecord.id) //this will add a groupID column with the value of the current groupRecord.id ) )

  • alrezac Profile Picture
    on at

    Hi,

     

    Thanks for your follow up post! I am glad that you were able to figure out your issue. Hopefully this will prove useful for future communities users who are having similar issues.

     

    Regards,

     

    Alex

     

    -------

     

    Community Support Team _ Alex Rezac
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard