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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Set the expiration of ...
Power Apps
Suggested Answer

Set the expiration of a record

(0) ShareShare
ReportReport
Posted on by 126
Hello, can I use the date of creation a record made through a form to set the expiration after a year, so I can see the date of expiration, I can set the "Status" active/inactive accordingly and even set the icon (circle) changing colour red to green?
How pls?
 
Thank you
Categories:
I have the same question (0)
  • Suggested answer
    ankit_singhal Profile Picture
    618 Moderator on at
    yes you can use Power automate. Set the expiry date when record is created and create another scheduled PA flow which will trigger daily and check all records which have expiry date = today date and inactive them.
     
    Note: Please mark verified, if it is useful for you 
  • Nirav Raval (Akira28) Profile Picture
    153 Moderator on at
     
    Use this method to change color -🤞
     
    Select your form add the below code on success - 
     
    >>  Set(varExpirationDate, DateAdd(ThisItem.CreatedDate, 365, Days));
     
    Set the gallery or data card with label control and set text property to -
     
    >>If(Today() > varExpirationDate, "Inactive", "Active")

    Add a Circle Icon on the screen and set the fill property to - 
     
    >>If(Today() > varExpirationDate, Red, Green)

     
    If this post solved your issue, clicking 'Does this answer your question' will help others discover the solution and close the topic. If you found it helpful, a Like would be awesome!


    Regards,
    Nirav J Raval (Akira28)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard