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

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

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 409 members 6,069 guests
Please welcome our newest community members: