Share via

Function reference for Logic Apps

Jihad H 1 Reputation point
2021-09-05T21:02:47.463+00:00

Hi
I am rather new to Logic Apps and have a general question concerning the functions I can use in Logic Apps.
I need to perform som operations on some dates such "adddays", "max" and "ticks".
My operations would look something like this:
max(ticks(adddays(mydate1, 1)), ticks(adddays(datetimeNow, 4)))

However, some of the dates I have may be null, in which case, I cannot seem to find anywhere information of how the above functions handle null as input. Looking in the Microsofts function reference (https://learn.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#outputs) states nothing of such input values.

Will adddays fail on a null value date? Or will it return null? The thing is I would be quite satisfied if it returns null, and if the ticks operations also returns null, and if max operation ignores null as input. If they do not handle null, what is the easiest way to get passed that hurdle?

Thanks
Jihad

Azure Logic Apps
Azure Logic Apps

An Azure service that automates the access and use of data across clouds without writing code.

0 comments No comments

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 71,016 Reputation points Moderator
    2021-09-07T09:35:17.957+00:00

    @Jihad H I belive mydate1 and datetimeNow are your input parameter that can have null value. In that case you need to check mydate1 and datetimeNow value if it is not null before evaluating the experssion max(ticks(adddays(mydate1, 1)), ticks(adddays(datetimeNow, 4)))

    In addDays the timestamp and days are the required parameter and that cannot be null. Similarly ticks timestamp is required and for max both the paramter are required. This condition needs to be handle in your workflow using condition actions.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.