cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RFWJR64
Frequent Visitor

Updating SharePoint List when a planner task is completed.

I am teaching myself Power Automate.  I did go to a training seminar, but am struggling.  I have read most of the posts and guides about how to update a SharePoint list status to completed, but somehow I am just not getting it.  I tried using the templates and the flows work, but the status on the SharePoint list doesn't update to completed.  I know I am missing something easy.  Here are some screenshots ... I am hoping somebody who is more seasoned than I am can give me some guidance and tell me what I am doing wrong.

 
 

Screenshot2.JPGScreenshot1.JPGSharepoint.png

1 ACCEPTED SOLUTION

Accepted Solutions

@RFWJR64 you can probably use simplified version below you don't need all of the fields just ID, Title and TaskID replace 
"TaskID":{

with "YourFieldName":{ 

 

{ 
   "type":"object",
   "properties":{ 
      "ItemInternalId":{ 
         "type":"string"
      },
      "ID":{ 
         "type":"integer"
      },
      "Title":{ 
         "type":"string"
      },
      "TaskID":{ 
         "type":"string"
      }
   }
}

 

View solution in original post

7 REPLIES 7
Gristy
Resident Rockstar
Resident Rockstar

your condition is not getting hit by the look of it.

you should also use a odata query in get items so that you do not need to do a condition to figure out - no need to loop through every item in your list if you know the plannerid you stored previous.

efisher
Advocate I
Advocate I

See images below 

1. you will need to filter your "Get Items" down to your correct item

2. I usually push first item object into variable - easier to use values in the flow down the line

3. parse Json of the item object - you get get schema by test running previous flow - your schema will be different from mine but I am including my item schema below

4. update your SP item using values from Json step

 

you are getting Apply to Each loop since Get items returns multiple values even if you filter to 1 item

 

Collapsed.png

 

FilterGetItems.png

Variable.png

 

Json.png

Update.png

{
  "type": "object",
  "properties": {
    "ItemInternalId": {
      "type": "string"
    },
    "ID": {
      "type": "integer"
    },
    "Title": {
      "type": "string"
    },
    "Due": {
      "type": "string"
    },
    "Status": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "integer"
        },
        "Value": {
          "type": "string"
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "Status#Id": {
      "type": "integer"
    },
    "TaskID": {
      "type": "string"
    },
    "Modified": {
      "type": "string"
    },
    "Created": {
      "type": "string"
    },
    "Author": {
      "type": "object",
      "properties": {
        "Claims": {
          "type": "string"
        },
        "DisplayName": {
          "type": "string"
        },
        "Email": {
          "type": "string"
        },
        "Picture": {
          "type": "string"
        },
        "Department": {
          "type": "string"
        },
        "JobTitle": {
          "type": "string"
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "Author#Claims": {
      "type": "string"
    },
    "Editor": {
      "type": "object",
      "properties": {
        "Claims": {
          "type": "string"
        },
        "DisplayName": {
          "type": "string"
        },
        "Email": {
          "type": "string"
        },
        "Picture": {
          "type": "string"
        },
        "Department": {
          "type": "string"
        },
        "JobTitle": {
          "type": "string"
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "Editor#Claims": {
      "type": "string"
    },
    "{Identifier}": {
      "type": "string"
    },
    "{IsFolder}": {
      "type": "boolean"
    },
    "{Thumbnail}": {
      "type": "object",
      "properties": {
        "Large": {},
        "Medium": {},
        "Small": {}
      }
    },
    "{Link}": {
      "type": "string"
    },
    "{Name}": {
      "type": "string"
    },
    "{FilenameWithExtension}": {
      "type": "string"
    },
    "{Path}": {
      "type": "string"
    },
    "{HasAttachments}": {
      "type": "boolean"
    },
    "{VersionNumber}": {
      "type": "string"
    },
    "@odata.etag": {
      "type": "string"
    }
  }
}

 

v-bacao-msft
Community Support
Community Support

 

Hi @RFWJR64 ,

 

What is the type of the Status field? I noticed that you used the JSON format to configure this field. Is there any special reason?

 

Please provide more details about it.

 

If its type is Choice, then you should select status value directly like configuring Progress Value.

 

If its type is Single line of text, then you should fill Completed directly. There is no need to fill in the JSON format.

 

Best Regards,

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

Thank you for the response.  Please forgive me if I don't use the correct terminology, but for the Parse JSON step, can I copy the entire schema that you wrote and use it as is or do I have to make some adjustment for my use?

 

 

@RFWJR64 you can probably use simplified version below you don't need all of the fields just ID, Title and TaskID replace 
"TaskID":{

with "YourFieldName":{ 

 

{ 
   "type":"object",
   "properties":{ 
      "ItemInternalId":{ 
         "type":"string"
      },
      "ID":{ 
         "type":"integer"
      },
      "Title":{ 
         "type":"string"
      },
      "TaskID":{ 
         "type":"string"
      }
   }
}

 

KrishnaV
Community Champion
Community Champion

Hi Team,

 

I am glad to see an approach to update the SharePoint list item when a task is completed. However, I don't see the approach to get task progress value directly as I don't see a trigger to handle as soon as the task is updated.

 

I have a requirement to update the Sharepoint list item as soon I see an update in Planner task.

 

Regards,

Krishna


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
Kaaaaro
Frequent Visitor

Dear @efisher!

could you please tell me how do I get  "YourFieldName":{ ?

Thanks!

KR

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,824)