web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

What 'ticks(outputs)' is used for in Power Automate flows?

(0) ShareShare
ReportReport
Posted on by 363

Hi,

I'm studying Power Automate flows and would like to better understand some expressions used inside the steps, but I couldn't find a related documentation.

I found the function ticks() with the parameter outputs inside a flow step.

Below the entire expression:

my-example.png

Can you please explain to me "step by step" the expression above?

Is the '?' a ternary operator (and if so, why do I need it here, and what the condition should be)?

I assume that "Test variable" is getting the value of the field datetobut where is defined which entity the field is taken from?

I have the same question (0)
  • Verified answer
    Wahaj Rashid Profile Picture
    11,321 on at

    Hi,

    Thank you for your query.

    The expression calculates the ticks (interval) for the DateTo column.

    DateTo column is being read from the body/output from a previous step.

    Most probably, you will have a for-each step before this step, expressions calculate the ticks and stores in the Test Variable. If it is not for each, this is also possible, previous step is a web API call and the output is a JSON object (which is returned by web API).

    To find out which column is DateTo, look at the previous actions, or share a full snapshot of the flow.

    To understand the use of '?', please look at the following post:

    Solved: Use of Question Mark(?) in expressions - Power Platform Community (microsoft.com)

    Here is a nice post on ticks expression:

    Flow - Calculate Date Diference - Power Platform Community (microsoft.com)

    In general, following the Microsoft learning module is a good start to learn about expressions:

    Introduction to expressions in Power Automate - Learn | Microsoft Docs

  • Verified answer
    Community Member Profile Picture
    on at

    Hi,

    1. This expression returns the number of ticks since the specified timestamp, you can get more information about it from this official documentation:

    https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#ticks

    2. The output expression is the output of the previous action.

    3. The '?' is not a ternary operator, it is used to get the next level of data, and use `? ` can avoid null error.

    For example, I added a compose action ,you can get the date from the output by using this expression:

    ticks(outputs('Compose')?['date'])

    The design for my Power Automate:

    pastedimage1625551274771v1.png

    This is my test result:

    pastedimage1625551459180v2.png

    4. The value of the ‘dateto’ field is created or received by your previous steps, just like the date field in my compose action.

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Frank Gong

  • Joel D Profile Picture
    363 on at

    Hi,

    Thank you for your replies, which have been really useful.

    I found another expression which is not clear to me. This another one uses the function sub(A.B), but instead of B, it seems that there is a nested expression:

    sub(0, items('Name_of_the_previous_action_inside_the_current_step')?[nameOfTheFieldOfTheEntityRetrievedInThePreviousAction']).



    I assume that 0 is the minuend, the rest of the expression is the subtrahend

    Is it correct? If yes, the value returned for nameOfTheFieldOfTheEntityRetrievedInThePreviousAction will be 0 minus the value previously assigned to nameOfTheFieldOfTheEntityRetrievedInThePreviousAction ...but it does not make sense for me, so it most likely means something different, but I could not find any relevant example with the related explanation, could you please help?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 58 Most Valuable Professional

#2
#ManoVerse Profile Picture

#ManoVerse 42

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 38 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans