Check if date field from MS Forms is empty in Power Automate

%3CLINGO-SUB%20id%3D%22lingo-sub-1742338%22%20slang%3D%22en-US%22%3ECheck%20if%20date%20field%20from%20MS%20Forms%20is%20empty%20in%20Power%20Automate%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1742338%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20flow%20that%20triggers%20when%20a%20new%20Forms%20response%20is%20submitted.%20In%20the%20form%2C%20it%20is%20a%20date%20field%20that%20is%20not%20required.%20In%20my%20flow%2C%20I%20put%20all%20the%20fields%20from%20the%20form%20into%20a%20SharePoint%20list.%20If%20that%20datefield%20is%20empty%2C%20the%20flow%20fails.%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20any%20of%20you%20know%20what%20test%20I%20can%20do%20in%20the%20Expression%20for%20the%20field%20so%20I%20don't%20get%20an%20error%3F%20I%20do%20not%20want%20to%20use%20a%20Condition%20because%20I%20have%20too%20many%20of%20them%20already%20%3D)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1742338%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Contributor

I have a flow that triggers when a new Forms response is submitted. In the form, it is a date field that is not required. In my flow, I put all the fields from the form into a SharePoint list. If that datefield is empty, the flow fails. 

Do any of you know what test I can do in the Expression for the field so I don't get an error? I do not want to use a Condition because I have too many of them already =)

2 Replies
Highlighted

Hi @Tonje Waasjø,

 

I'm not sure it's possible without using a Condition or a replacement date (when null).

 

Norm  

Highlighted

Hey @Tonje Waasjø , in my opinion you dont need an expression, you can insert a Variable Action.

 

Before the SharePoint action create a parallel branch to catch an error with empty date field in the first branch. That is much easier to deal with isEmpty() validations on fields.

 

So the second branch can catch the next action in case the first branch erros out: create a string variable, because the Date Field in MS Forms will be seen as an integer value, and sharepoint can then get it as an emply text content without an error, so are my ideas on this.

 

Hope that helps, Eva.