cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jjamisn
Advocate I
Advocate I

Get Planner Task description and add to a collection

I am trying to create a gallery of planner tasks that can be searched using specific sections of the text within the task description because the task is created using a power automate and is always in the same format. 

I believe I need to add a column to my collection of tasks to grab the description, but I can not make it work. 

Here is what I was trying: ClearCollect(cDesignImprovements, AddColumns(Filter(Planner.ListTasksV3("Plan ID","Group ID").value,bucketId="Bucket"),"TaskDescript",Planner.GetTaskDetailsV2(id)))

 

Any help would be appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions

Gotcha, how about a slightly different approach?:

ForAll(Planner.ListTasksV3("PlanID", "TaskID").value,
        Collect(cDesignImprovements,
            { 
                TaskName: ThisRecord.title,
                TaskNotes: Planner.GetTaskDetailsV2(ThisRecord.id).description
                // Add other fields you want to collect here
            }
        )
)

You can populate the collection with additional terms in the Collect() function with the data you need for your app.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

5 REPLIES 5
BCLS776
Super User
Super User

To use the connector properly, you'll need to specify the actual ID for Plan ID and Group ID that you want to query.

 

Try the the Planner.ListMyPlansV2().value query to start, which gives you back a table of plan titles and IDs. From there you can filter and access the specific tasks in a plan using the plan's ID.

 

To get Group ID, query using the Office365Groups.ListOwnedGroups_V3 connector. You can make some functionality to choose the group, or hardcode in the ID if that's easier for you.

 

Once you have those IDs, you can plug them into your ClearCollect and get further to your results.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

I had hardcoded the group and plan id into the function. I removed them from my initial post to look more general. The part I really need help with is adding the task description to my cDesignImprovements collection. 

I can see names of individual tasks at this level of query:

 

Planner.ListTasksV3(PlanID, GroupID).value.title

 

Try this code:

ClearCollect(cDesignImprovements, 
    AddColumns(
        Planner.ListTasksV3("PlanID", "TaskID").value,
        "TaskDescript",
        title
    )
)

Make sure that code is collecting the task description you want, and then add back your Filter.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

I may be using the wrong terminology in what I am asking for. That did give me the title of the task. but I am really looking for the Notes portion on the actual Planner task. (in the yellow box in the picture)

Planner Task Simplified.png

I know within powerapps I can use the Planner.GetTaskDetailsV2(taskID).description and return this on my gallery. But I need that notes section in my collection so I can get some of the text out of it and search using what I take out. 

Gotcha, how about a slightly different approach?:

ForAll(Planner.ListTasksV3("PlanID", "TaskID").value,
        Collect(cDesignImprovements,
            { 
                TaskName: ThisRecord.title,
                TaskNotes: Planner.GetTaskDetailsV2(ThisRecord.id).description
                // Add other fields you want to collect here
            }
        )
)

You can populate the collection with additional terms in the Collect() function with the data you need for your app.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

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 (1,285)