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?
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
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
12 | |
11 | |
7 | |
6 | |
6 |
User | Count |
---|---|
19 | |
18 | |
12 | |
10 | |
9 |