Hello
I have a Flow that creates a SharePoint list item after a MS Form is submitted. The field is an "end date". If the end date is blank, I receive an error that "Input parameter 'item/EndDate' is required to be of type 'String/date'. The runtime value '""' to be converted doesn't have the expected format 'String/date'."
Any suggestions as to how I can create an expression that will ignore the field if it is left blank? I have tried to change the list item field to single line text, but that still doesn't seem to work.
Thanks so much,
Abbey
Solved! Go to Solution.
Hi @amiles
Instead of using the date directly, you should use an expression.If 'End Date' is empty, update 'null' value into the column (to keep it empty); if it's not empty, update the actual value.
Expression:
if(equals(outputs('Get_response_details')?['body/ra66dc3ce64ec4c63af091d4ced99b95c'],''),null,outputs('Get_response_details')?['body/ra66dc3ce64ec4c63af091d4ced99b95c'])
Hope the content above may help you.
Best Regards
If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @amiles
Instead of using the date directly, you should use an expression.If 'End Date' is empty, update 'null' value into the column (to keep it empty); if it's not empty, update the actual value.
Expression:
if(equals(outputs('Get_response_details')?['body/ra66dc3ce64ec4c63af091d4ced99b95c'],''),null,outputs('Get_response_details')?['body/ra66dc3ce64ec4c63af091d4ced99b95c'])
Hope the content above may help you.
Best Regards
If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-LilyW-msft - thank you so much for your quick response! When entering that expression, I receive an error per below:
Am I missing something?
Take care,
Abbey
Hi @amiles1
From your screenshot, there is a missing ‘(’ between if and equal, Please add '(' and try again.
Best Regards
thank you again for the quick reply. I have updated the expression and I still receive this error:
Any additional troubleshooting advice?
Thanks,
Abbey
Hi @amiles1
I don't see any problem in your formula.
Please add a Compose action and select End Date in it before Create Item action.
Then copy the Expression and try again:
if(equals(outputs('Compose'),''),null,outputs('Compose'))
Best Regards.
Thanks Thanks Thanks !!! I had the same problem. This resolved it like a charm.
User | Count |
---|---|
103 | |
36 | |
29 | |
25 | |
16 |
User | Count |
---|---|
133 | |
53 | |
53 | |
36 | |
26 |