Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 1,151

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

  • AliceW Profile Picture
    280 on at
    Re: is it possible to add a business rule that sets default date as today

    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!
  • Jonathan Manrique Profile Picture
    2,678 on at
    Re: is it possible to add a business rule that sets default date as today

    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

     

     

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 17

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics