web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Validate complex date formulas using Regex on model-driven

(0) ShareShare
ReportReport
Posted on by 905

Hello everyone,

In Dynamics NAV, we can create a data type that can have the below date formulas:
www.clientsfirst-us.com/.../

What I am trying to achieve is the following:

I have a custom model-driven application in dataverse with some custom tables.
In one of the tables, I have a text field called "Date Formula" and I would like to do a validation on the characters for that field that should only accept the date list template mentioned in the above blog post provided.

Example: If the user type 1M+CM which (Returns the last date of the following month) the date field will be validated and the form can be saved.
However, if the user typed something like this: 1M+CM$!@ or something that is not validated in the date formula blog post mentioned the form will never be saved.

In addition here is another complex example that will be validated if he typed, CW+1DorCW+WD1 which returns the Monday of Next Week.

I believe that the above requirements require plugin customization by using Regex Expression to validate & match the same date formulas in NAV.

Could you please advise what is the best solution to implement the above requirements? I would highly appreciate it if you can provide an example or documentation to implement it.

Please let me know if you need further information.

Best regards,
EBMRay

I have the same question (0)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans