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 / Business Rule Default ...
Power Apps
Unanswered

Business Rule Default Date Value To Now

(2) ShareShare
ReportReport
Posted on by 74

I have a very basic question: can a date value be set to Now() in a business rule?  Say I have a model-driven app with a status field that displays an option set.  When a business rule is triggered by an event like the value selected for status = closed.  I want the close date to be set to Now() and displayed immediately in the client.  I see how I can perform this using a calculated field but I'm wondering if the same is possible via a business rule so the change is immediately displayed to the user without first having to save the entity (as would be necessary if relying on the calculated field).  Am I missing something obvious?

 

Thanks in advance,

Dan

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,989 Moderator on at

    @djallen 

    Are you talking about the Rules feature in PowerApps.  If so, I suggest you avoid rules altogether.  They were deprecated awhile ago and I assume eventually the feature will not be supported anymore by PowerApps.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • djallen Profile Picture
    74 on at

    @mdevaney 

     

    No, sorry.  I meant a Business Rule.  Such as you define for a model driven app: https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/create-business-rules-recommendations-apply-logic-form

     

    Thanks,

    Dan

  • timl Profile Picture
    36,383 Super User 2025 Season 2 on at

    Hi Dan,

    I don't think this is possible unfortunately.

    In the business rule editor, we can set a static date or enter a formula. If we choose the formula option, there isn't a 'Now()' option that would enable us to enter the current date.

     

    image.png

    Perhaps someone else here might know of a workaround, or to advise further.

  • testasdfasfsafa Profile Picture
    309 on at

    Again, another example of an unfinished and polished product.  Why having business rules, if the user can't even setup a date or calculated date...    For Christ's sake, we could do that with Infopath in 2003.

  • justinridgebd Profile Picture
    6 on at

    That's a lot of unnecessary negativity and blaspheme right there.
    😞

  • justinridgebd Profile Picture
    6 on at

    A pretty decent workaround is to use Power Automate to conditionally set the Date field using utcNow()

  • testasdfasfsafa Profile Picture
    309 on at

    That is NOT a good option.  The validation or rule must be done in the form, like normal form technologies. The fact that variables can't be used in Business Rules after YEARS of asking, it clearly shows how little Microsoft cares about this product.

  • Community Power Platform Member Profile Picture
    on at

    As a workaround, you can creat a calculate column with the function Now(), and set the date you want with this value

  • Community Power Platform Member Profile Picture
    on at

    You need to use JScript to change the field value.

    function ChangeDateToNow(){
     Xrm.Page.getAttribute("new_todaydate").setValue(Date.now());
    }

     See both links below which might be helpfull:
    Set Date as today using business roles - Microsoft Dynamics CRM Forum Community Forum
    Business rule - use current date ! - Microsoft Dynamics CRM Forum Community Forum

  • kojima Profile Picture
    108 on at

    I agree.  PowerApps have too many examples like this.  

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard