Skip to main content

Notifications

Community site session details

Community site session details

Session Id : Ldap7/k13GjKehx14J3vYH
Power Apps - Building Power Apps
Unanswered

Business Rule Default Date Value To Now

Like (2) ShareShare
ReportReport
Posted on 6 Mar 2020 16:01:24 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:
  • Suggested answer
    ATAAAY Profile Picture
    3 on 07 Sep 2024 at 16:48:18
    Business Rule Default Date Value To Now
    You can Set the Date to Modified On so it takes the current date 
     
  • kojima Profile Picture
    108 on 20 Jul 2023 at 02:14:37
    Re: Business Rule Default Date Value To Now

    I agree.  PowerApps have too many examples like this.  

  • Community Power Platform Member Profile Picture
    on 20 Jan 2023 at 12:00:46
    Re: Business Rule Default Date Value To Now

    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

  • Community Power Platform Member Profile Picture
    on 20 Jan 2023 at 11:29:20
    Re: Business Rule Default Date Value To Now

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

  • testasdfasfsafa Profile Picture
    307 on 11 Apr 2022 at 17:48:27
    Re: Business Rule Default Date Value To Now

    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.

  • justinridgebd Profile Picture
    6 on 24 Feb 2022 at 02:29:48
    Re: Business Rule Default Date Value To Now

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

  • justinridgebd Profile Picture
    6 on 24 Feb 2022 at 02:27:29
    Re: Business Rule Default Date Value To Now

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

  • testasdfasfsafa Profile Picture
    307 on 04 Feb 2022 at 14:32:13
    Re: Business Rule Default Date Value To Now

    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.

  • timl Profile Picture
    34,951 Super User 2025 Season 1 on 06 Mar 2020 at 20:28:07
    Re: Business Rule Default Date Value To Now

    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.

  • djallen Profile Picture
    74 on 06 Mar 2020 at 17:56:23
    Re: Business Rule Default Date Value To Now

    @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

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard