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
Community Support
Community Support

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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (25,784)