cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dbnok
Level: Powered On

Flow integration with Planner missing some parameters

I am a newbie and trying to start out with automating the copy of a tasks from one plan to another.

 

I have been using the Actions "Get a task", "Get task details" followed by "Create a task", "Update a task", and "Update task details" with good success.

 

However, some parameters which appear in the "List tasks" Actions output are not available in those other Actions to create/update in a task. Put another way, there are parameters in the ListTasks_Response_V2 that are not present in either GetTask_Response_V2 or GetTaskDetails_Response. For example, the parameters value.createdBy.user.displayName, value.createdBy.user.id, and value.completedDateTime.

 

Is there any means by which I can obtain the values for those unavailable parameters from my source task and then apply those values to the parameters of my target task?

4 REPLIES 4
Community Support Team
Community Support Team

Re: Flow integration with Planner missing some parameters

Hi @dbnok ,

 

Do you want to get parameters “value.createdby.user.displayName” and “value.createdBy.user.id” from an individual Planner task?

 

I am afraid that not all the parameters could be retrieved from action Get a task and Get task details. Here is one of the similar requests from Flow Ideas Forum, please vote it:

https://powerusers.microsoft.com/t5/Flow-Ideas/Planner-get-more-details-from-a-task-in-planner-e-g-C...

 

You may also try using the following workaround to get the two parameters you want. You may need to add a Condition to find out the specific task from action List tasks, then get corresponding parameters from action List tasks.

 

An image for your reference.

1.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
dbnok
Level: Powered On

Re: Flow integration with Planner missing some parameters

Hi @v-yamao-msft 

Thanks for the response.  Yes that confirms that I can read those parameters from a task, but now how do I set/update those parameters on the target task of interest?  For example, I can't use 'Update a task' or 'Update task details' to update the value.completedDateTime for a given task, so is there a way using a 'Compose' or some other data API to do so?

Community Support Team
Community Support Team

Re: Flow integration with Planner missing some parameters

Hi @dbnok ,

 

Thanks for updating.

 

I am afraid that it might be not possible to achieve your goal directly.

 

However, you could try with Custom APIs to insert to update completed date time for a given task.

 

You could also submit a request on this feature at Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Best regards,

Mabel

 

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
dbnok
Level: Powered On

Re: Flow integration with Planner missing some parameters

Thanks @v-yamao-msft 

 

I thought I had an idea how to make it work, but the result failed:

1. I created a task (it is the only task in the plan)

2. After some time I marked the task as completed

3. In my Flow, I do the following:

  - List tasks

  - Using Apply to each

  -Set a string variable to the 'createdDateTime' using the Flow GUI:

 

{
    "inputs": {
        "name": "SrcTaskDate",
        "value": "@items('Apply_to_each')?['createdDateTime']"
    }
}

  - I then do the same "Set" for the 'completedDateTime':

{
    "inputs": {
        "name": "SrcTaskDate",
        "value": "@items('Apply_to_each')?['completedDateTime']"
    }
}

  - I use a "Compose" with the following expression to try and set the 'completedDateTime' property:

    setProperty(items('Apply_to_each'),'completedDateTime',items('Apply_to_each')?['createdDateTime'])

    which generates code as:

{
    "inputs": "@setProperty(items('Apply_to_each'),'completedDateTime',items('Apply_to_each')?['createdDateTime'])"
}

  - After this I just set the string variable again to the completedDateTime to see what is retrived

 

When I debug the Flow, I see the following dates being assigned to my string variable:

    2019-08-05T11:47:48.5431951Z  <-- created
    2019-08-05T12:37:24.2542618Z  <-- completed

Those represent the created and completed dates respectively, corresponding to when I took action in  MS Planner.

 

My "Compose" shows the completedDateTime property as I expect:

   "completedDateTime": "2019-08-05T11:47:48.5431951Z"

Since the code was intended to set the completed time equal to the created time.

 

But, after the Compose: when I set the string variable to the completedDateTime from the item, it still shows the same date:

  2019-08-05T12:37:24.2542618Z

My Flow is very simple:

image.png

 

The full text of the Compose is like this:

{
  "@odata.etag": "W/\"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBAUCc=\"",
  "planId": "<<redacted>>",
  "bucketId": "<<redacted>>",
  "title": "Try1",
  "orderHint": "8586366012169343856",
  "assigneePriority": "8586366012169343856",
  "percentComplete": 100,
  "startDateTime": null,
  "createdDateTime": "2019-08-05T11:47:48.5431951Z",
  "dueDateTime": null,
  "hasDescription": false,
  "previewType": "automatic",
  "referenceCount": 0,
  "checklistItemCount": 0,
  "activeChecklistItemCount": 0,
  "conversationThreadId": null,
  "id": "<<redacted>>",
  "createdBy": {
    "user": {
      "displayName": null,
      "id": "<<redacted>>"
    }
  },
  "completedBy": {
    "user": {
      "displayName": null,
      "id": "<<redacted>>"
    }
  },
  "appliedCategories": {},
  "assignments": {
    "<<redacted>>": {
      "@odata.type": "#microsoft.graph.plannerAssignment",
      "assignedDateTime": "2019-08-05T11:47:48.5431951Z",
      "orderHint": "",
      "assignedBy": {
        "user": {
          "displayName": null,
          "id": "<<redacted>>"
        }
      }
    }
  },
  "_assignments": [
    {
      "userId": "<<redacted>>",
      "value": {
        "@odata.type": "#microsoft.graph.plannerAssignment",
        "assignedDateTime": "2019-08-05T11:47:48.5431951Z",
        "orderHint": "",
        "assignedBy": {
          "user": {
            "displayName": null,
            "id": "<<redacted>>"
          }
        }
      }
    }
  ],
  "completedDateTime": "2019-08-05T11:47:48.5431951Z"
}

Any idea why my attempt at using "setProperty" isn't working properly?  It looks like it is indeed setting the property on the item, based on the Compose output, but items('Apply_to_each')?['completedDateTime']" does not seem to reflect the udpate??

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 357 members 5,133 guests
Please welcome our newest community members: