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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Automate Cloud Flow to...
Power Apps
Answered

Automate Cloud Flow to disable records that are expired

(0) ShareShare
ReportReport
Posted on by

I'm new, not sure how to code the following in Cloud flow?

 

Table:

UserCertification (UserID, CertificationID, Name, ExpirationDate, Status, StatusReason)

Team (UserId, Name, RoleID)

 

Business Logic:

Select records from UserCertification that expiration date less than today

If expired, set UserCertifcation.Status=Inactive

Removed user from Team via UserID

 

Scheduled to run daily at 12am.

I have the same question (0)
  • Verified answer
    EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Hi @Anonymous,

    It's definately possible with a cloud flow. Use a scheduled trigger , then have a List Rows step to select the records that expiration date < today (note: Dataverse uses UTC formats). The filter expiration data logic would look something like this:

    EricRegnier_0-1670746487762.png

     

    Then have a Update Row action to set the status as inactive.

     

    To remove user from a team use the Unrelate action and pick the relationship of type "Team - teammembership_association"

    EricRegnier_1-1670746835871.png

    Hope this helps!

  • Community Power Platform Member Profile Picture
    on at

    After the "List Rows", how do you pass the row id for "update row" and same for the unrelate action?

  • Community Power Platform Member Profile Picture
    on at

    Is there a way to add condition to only update the status if the unrelate step is successful? If I make status be the last step.

  • Verified answer
    EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    You get by looping through the records found from the List Row action

    EricRegnier_0-1670831325383.png

     

  • Verified answer
    EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Yes, this is by default. The flow will only execute the step if the preceding one succeeded, and you can change that:

    EricRegnier_1-1670831403117.png

    EricRegnier_2-1670831418902.png

     

     

  • Community Power Platform Member Profile Picture
    on at

    Thank you for your patience and providing me guidance.

     

    I figured it out. I need to get both User and Team by ID in order to unrelate user from the correct team.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard