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.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,174)