Daily Trigger TimeSpan and provide End date.

Write a power automate which will trigger daily, get the records from time stamp entity which records don’t have end date, update date end date and calculate the time?


Step 1 and 2: 


<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">

  <entity name="effizz_timespan">

    <attribute name="effizz_timespanid" />

    <attribute name="effizz_name" />

    <attribute name="createdon" />

    <attribute name="effizz_start" />

    <order attribute="effizz_name" descending="false" />

    <filter type="and">

      <condition attribute="effizz_end" operator="null" />

    </filter>

  </entity>

</fetch>


Step 3 and 4:

In div take this value from expression :

div(div(mul(sub(ticks(formatDateTime(utcNow())),ticks(items('Apply_to_each')?['effizz_start'])),100),1000000000),60)







Comments

Popular posts from this blog

Relationship Behaviours in D365 crm

If any case created, then check for the same user how many cases are created with in 30 days, if more than 2 and less than 5 send a mail to team lead, if more than 5 and less than 9 then send a mail to manager using power automate.

Power Apps Cheat Sheet