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 / is it possible to add ...
Power Apps
Unanswered

is it possible to add a business rule that sets default date as today

(0) ShareShare
ReportReport
Posted on by 1,164

Hi,

I have a date column in Dataverse and would like to set its default value to today if a different column has a specific value.

Flow is not really an option as its too slow.

Thanks

Todd

I have the same question (0)
  • Jonathan Manrique Profile Picture
    2,687 on at

    Hi @Tango 

     

    Not Business Rules as a business rule, but you can use Javascript or a WorkFlow to do it

     

     

     

    function formOnload(executionContext) {
     // Get a reference to the form context
     var formContext = executionContext.getFormContext(); 
    
     // Create a new Date object to get today's date
     var today = new Date();
    
     // Set the value of the date field
     formContext.getAttribute("nombre_del_campo_fecha").setValue(today);
    }

     

     

     

    Another way is to use Power Fx,

    Jmanriquerios_0-1715329148941.png

     

     

    Jmanriquerios_1-1715328147875.png

     

     

  • AliceW Profile Picture
    286 on at

    Use this

    If('Field A' = "Confirmed", Now())
    Works for fields with String values
     
    if 'Field A' is a Choice field:
    If(Field A ='Field A (Table)'.Confirmed, Now())
    Good luck!

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard