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

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Set Date Based On Another Field Value

(0) ShareShare
ReportReport
Posted on by 60

I need to set the current date on a field based on the selection of a value of another field.

I have tried using a calculated date field based on several other forum answers that I've found. However, the date will change to the current date no matter what parameters I give the calculated field.

For example, I have an option set with values of "Approved" and "Rejected." I want to set the Approval Date field to today's date as soon as the user selects "Approved" from the option set. However, I do NOT want that date to change in the future so I can preserve the date when the record was "Approved."

I have tried to use a calculated date field with the following condition/action:

- If [approval field] = approved

- set [approval date] = NOW()

Alternately:

- If [approval field] = approved

- set [approval date] =  modifiedon()

Both of these configurations, however, will set the date to the current date and time whenever I open the record.

I have tried the workflow approach but obviously can't dynamically set the date to "today."

I also can use jscript if necessary but would rather not as I'm in a time crunch.

I have the same question (0)
  • Suggested answer
    ba365guy Profile Picture
    2,950 on at
    RE: Set Date Based On Another Field Value

    1. Create a synchronous workflow.

    2. Trigger this on change of your option set (approved/ rejected) field

    3. Add if condition: 

    If Approved : Set Process Execution Time in "Approved on" field

    If Rejected: Set process execution time in "Rejected on" field.

    Please refer this link on "how to set process execution time" 

    https://crmbusiness.wordpress.com/2014/04/08/crm-2013-workflow-to-set-the-current-date-and-time/

    4. Add a step to stop workflow

    5. Save and activate workflow

  • erhan.keskin Profile Picture
    2,253 on at
    RE: Set Date Based On Another Field Value

    Hi,

    You can use Approval Date in the criteria as well. For instance; if it is Approved and Approval Date doesn't contain data, then set a value to the Approval Date. If it is Not Approved and Approval Date contains data, then set Approval Date to null.

    Regards,

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 242

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 83 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 68 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans