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

Null Start Date on Planner Task

I'm trying to pass a null value for the start date on 'Create a task'. The start date is listed in the step (and documentation) as an optional field, yet it won't run the flow without it. This is the failure feedback that I'm receiving:

 

The request is invalid: Cannot convert the literal '' to the expected type 'Edm.DateTimeOffset'. 

 

{
  "error": {
    "code""",
    "message""The request is invalid:\r\nCannot convert the literal '' to the expected type 'Edm.DateTimeOffset'.",
    "innerError": {
      "request-id""8c883428-a179-485c-961f-e5b538d44a20",
      "date""2018-03-12T14:29:32"
    }
  }
}

 

My intent is to allow the task to be created with or without a start date, then updated through a separate flow if a start date is assigned or modified later. This is the expression that I'm using on the create flow 'Start Date Time' step: 

 

if(empty(triggerBody()?['Assigned_x0020_Start_x0020_Date']), null, triggerBody()?['Assigned_x0020_Start_x0020_Date'])

 

Any thoughts for getting the step to accept a task with no start date?

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Null Start Date on Planner Task

Hi @ nhalvorson,

 

Where is the task’s start date saved in?

Could you please share a screenshot of your flow's configuation?

 

I have made a test on my side, you couldn’t insert the null value in the “Start Date Time” field of the “Create a task” action of Planner connector.

 

For you situation, you could add a Condition to check if the “start date” is null,the expression in the Condition as below:

@empty(triggerBody()?['Assigned_x0020_Start_x0020_Date'])

if the “start date” is null, then the flow wouldn’t insert the “start date” in the “Start Date Time” field of the “Create a task” action, if the “start date” isn’t null, then the flow would insert the “start date” in the “Start Date Time” field of the “Create a task” action.

 

Regards,
Alice Zhang

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Users online (6,989)