top of page
Writer's pictureRishi Verma

Check if a field (date) is blank In Microsoft Automate

It's a simple work around if you are facing issue in doing a null chuck in Microsoft Automate.

Our example a date is being fetched through a CDS connector and i want to check the date has value or not before creating a task activity with a due date based on the date being fetched.

ideally the below should work:



But this throws a runtime error like below :



Since we can't add custom code in power automate yet,

the workaround is:

  • Initialize a Boolean Variable outside the loop

  • Then inside your Apply to each, Set the Variable something like

  • Set Boolean Variable = empty(item()?['Date_coming_from_CDS'])

the third line resolves on runtime like:



and you can finally use this new Boolean variable in your condition and it will work :




Hope this workaround was useful for you. All the topics on this blog can vary from simple problems to really big problems like the topic of Solution patching or PCF controls.

Hopefully, you will enjoy reading them and implementing them.

4,974 views0 comments

Comments


bottom of page