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

Call Action Through JavaScript

Power Apps Cheat Sheet