Notifications
Announcements
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
@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."
@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,
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.
Perhaps someone else here might know of a workaround, or to advise further.
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.
That's a lot of unnecessary negativity and blaspheme right there.😞
A pretty decent workaround is to use Power Automate to conditionally set the Date field using utcNow()
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.
As a workaround, you can creat a calculate column with the function Now(), and set the date you want with this value
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 ForumBusiness rule - use current date ! - Microsoft Dynamics CRM Forum Community Forum
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 717 Most Valuable Professional
Michael E. Gernaey 329 Super User 2025 Season 2
Power Platform 1919 268