cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simondpalmer
Helper II
Helper II

Add additional column for Planner planId per groupId

Hi I have a button which has the following:

 

 

ClearCollect(MyGroupandPlansGalleryItems,If(!IsEmpty(MicrosoftTeams.GetAllTeams().value),ForAll(MicrosoftTeams.GetAllTeams().value, AddColumns(Planner.ListGroupPlans(id).value,"groupname",displayName))));
Clear(MyPlansGalleryItems);
ForAll(MyGroupandPlansGalleryItems,Collect(MyPlansGalleryItems,Value))

 

 

This works perfectly providing these columns :

Capture.JPG

 However I want to add a column for the group id. Not only the group name which in this case is shown as "groupname".

Therefore I want the following column headers (derived field):

  • groupname (groupname)
  • groupId (groupid)
  • title (planname)
  • id (planid)

The purpose of this is to use these id's for a flow that brings back planner task information that is otherwise not available (i.e. appliedCategories..etc.) 

I tried to use Planner.ListGroupPlans(id).value again but it just got to confusing with all the syntax. Any help would be great thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

HI @simondpalmer ,

Could you please share a bit more about your scenario?

Do you also want to add a GroupId column in your MyGroupandPlansGalleryItems collection?

 

I have made a test on my side, please consider take a try with the following workaround:

8.JPG

Set the OnSelect property of the Button to following:

Clear(MyGroupandPlansGalleryItems);
ForAll(
       RenameColumns(MicrosoftTeams.GetAllTeams().value, "id", "groupId"),
       Collect(MyGroupandPlansGalleryItems,  AddColumns(Planner.ListGroupPlans(groupId).value,"groupname",displayName, "groupId", groupId))
)

The MyGroupandPlansGalleryItems collection looks like below:

9.JPG

 

On your side, please consider modify your formula as below:

Clear(MyGroupandPlansGalleryItems);
ForAll(
       RenameColumns(MicrosoftTeams.GetAllTeams().value, "id", "groupId"),
       Collect(MyGroupandPlansGalleryItems,  AddColumns(Planner.ListGroupPlans(groupId).value,"groupname",displayName, "groupId", groupId))
);
Clear(MyPlansGalleryItems);
ForAll(MyGroupandPlansGalleryItems,Collect(MyPlansGalleryItems,Value))

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

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

View solution in original post

1 REPLY 1
v-xida-msft
Community Support
Community Support

HI @simondpalmer ,

Could you please share a bit more about your scenario?

Do you also want to add a GroupId column in your MyGroupandPlansGalleryItems collection?

 

I have made a test on my side, please consider take a try with the following workaround:

8.JPG

Set the OnSelect property of the Button to following:

Clear(MyGroupandPlansGalleryItems);
ForAll(
       RenameColumns(MicrosoftTeams.GetAllTeams().value, "id", "groupId"),
       Collect(MyGroupandPlansGalleryItems,  AddColumns(Planner.ListGroupPlans(groupId).value,"groupname",displayName, "groupId", groupId))
)

The MyGroupandPlansGalleryItems collection looks like below:

9.JPG

 

On your side, please consider modify your formula as below:

Clear(MyGroupandPlansGalleryItems);
ForAll(
       RenameColumns(MicrosoftTeams.GetAllTeams().value, "id", "groupId"),
       Collect(MyGroupandPlansGalleryItems,  AddColumns(Planner.ListGroupPlans(groupId).value,"groupname",displayName, "groupId", groupId))
);
Clear(MyPlansGalleryItems);
ForAll(MyGroupandPlansGalleryItems,Collect(MyPlansGalleryItems,Value))

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

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

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,994)