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 :
Customer experience | Sales, Customer Insights,...
Suggested answer

Field updates automatically based off date

(2) ShareShare
ReportReport
Posted on by 4
Hi all,
 
I am a user for my organisations CRM and I am wanting to implement a field that is a YES/NO based off current date. The logic would be as follows.
 
Yes IF date < todays date for a given financial year (2024 - 2025) for example.
No IF date is >= todays date for a given financial year.
 
Currently I cant find a way to do this with the caulculated fields, assuming I might have to explore business flows which I dont have much experience with.
 
Is there any way to add a field like this to CRM that would automatically update everyday? so that as the year progresses it would result in more fields = yes.
 
 
Thanks.
I have the same question (0)
  • Daivat Vartak (v-9davar) Profile Picture
    7,833 Super User 2025 Season 2 on at
    Field updates automatically based off date
    Hello MY-06050353-0,
     

    Yes, you can definitely achieve this using Dynamics 365 (Power Apps) functionality. While calculated fields have limitations with dynamic "today's date" comparisons that update automatically every day, you have a couple of good options:

     

    1. Using a Calculated Field (with a Clever Workaround for "Today"):

    While a standard calculated field can't directly use a function that updates every day, you can leverage the NOW() function and some date manipulation to achieve a result that effectively changes based on the current date each time the record is loaded or its fields are updated.

    Here's how you could structure the calculated field:

    • New Field: Create a new field with the following properties:

      • Display Name: e.g., "Is Before Today FY25"

      • Name: e.g., new_isbeforetodayfy25

      • Data Type: Two Options (Yes/No)

      • Field Requirement: Optional

      • Calculated: Yes

       


    • Define the Calculation: Click the Edit button for the calculated field and use a formula like this (adjusting the date logic for your specific financial year):
       

      Explanation:


      • [your_date_field]: Replace this with the logical name of the date field you want to compare.

      • DATEVALUE(): This function extracts the date portion from a date/time value, making the comparison date-only.

      • NOW(): This function returns the current date and time. DATEVALUE(NOW()) gives you today's date.

      • IF(condition, value_if_true, value_if_false): This is a standard conditional statement.


      •  
       

      How it Updates:


      • The calculated field will be evaluated and updated whenever the record is loaded or when any of its source fields (in this case, [your_date_field]) are changed and the record is saved.

      • While it doesn't update automatically every single day in the background for all records, it will reflect the correct "Yes/No" status based on the current date when a user views or interacts with the record.


      •  

    Limitation of Calculated Fields for True Daily Updates:

    Calculated fields are computed on-demand when a record is retrieved or modified. They don't have a built-in mechanism to trigger a recalculation for all records at a specific time each day.

     

    2. Using a Scheduled Power Automate Flow (for True Daily Updates):

    If you need the field to actually update for all relevant records every day without user interaction, then a scheduled Power Automate flow is the way to go. This is what you were likely thinking of with "business flows."

    Here's a high-level outline of how you could set up a flow:


    • Trigger: Set up a Recurrence trigger to run the flow once per day (e.g., at midnight).

    • Action: List Records: Use the "List rows" action from the "Dataverse" connector to retrieve all the records of your entity that have the date field you're interested in. You might want to add a filter here if you only need to update a subset of records.

    • Action: Update a Row (within a "For each" loop):

      • Add a "For each" control to iterate through each record retrieved in the previous step.

      • Inside the loop, add an "Update a row" action from the "Dataverse" connector.

      • Entity Name: Select your entity.

      • Row ID: Use the dynamic content from the "List rows" action to specify the current record's ID.

      • Update the "Yes/No" field: Set the value of your "Yes/No" field using an expression similar to the IF logic from the calculated field, but you'll use the utcNow() function in Power Automate for the current date:

        if(less(item()?.'your_date_field', utcNow()), true, false)


        • Replace 'your_date_field' with the schema name of your date field.

        • utcNow() gets the current UTC time. You might need to adjust for your timezone if necessary using functions like convertTimeZone.

        • less() checks if the first value is less than the second. 
         

    • Save and Test: Save your flow and test it to ensure it updates the records correctly.

     

    Which Approach Should You Choose?

    • Calculated Field: Simpler to implement and works well if you only need the "Yes/No" status to be up-to-date when a user views or interacts with a record. This is often sufficient for reporting and form logic.

    • Power Automate Flow: Necessary if you absolutely need the field to be updated daily in the background for all relevant records, regardless of user interaction. This is more complex to set up but provides true daily automation.


    •  

    Given your description, the calculated field approach might be sufficient as the "Yes/No" status will be accurate whenever a user looks at a record. You don't necessarily need to update every single record in the database at midnight if the logic is primarily for display or form behavior.

    Let me know if you'd like detailed steps on how to create either the calculated field or the Power Automate flow!

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak
  • Suggested answer
    Tom_Gioielli Profile Picture
    2,192 Super User 2025 Season 2 on at
    Field updates automatically based off date
    Calculated and formula fields can do a lot, but they don't have the full functionality in Dataverse that they do in Canvas apps or other areas such as flows. You basically have a few options to accomplish this. 
     
    Cloud Flows
    You can write a cloud flow that runs daily. In it, you would have the following steps:
    1. List Rows - Dataverse: You would want to filter down to only retrieve the rows where your date field is less than the current date, and where the boolean value is still NO
    2. Update a Row - Dataverse: Use this to update the value of the boolean field on your found records to YES. This action will automatically loop through all of your records from the list action once you define it
     
    Dataflow
    These are similar to cloud flows, but can be a little more friendly if you are familiar with PowerQuery/PowerBI.
    1. Create a dataflow and connect to your CRM instance and the table in question
    2. Filter the list down to just those records that require an update
    3. Create a custom column with the value set to "YES"
    4. Map that custom column to your existing boolean field to update
    5. Schedule the Dataflow to run once daily
     
    With the above solutions being said, I think I would recommend fleshing out your requirement a bit more. The question is, why do we need this other boolean field at all if we can simply filter down our system views to show records with a date in the past, or to set the Fiscal Calendar in CRM so you can filter based on fiscal year (This fiscal year, Last Fiscal Year, etc.). Check the below for more information on how to update this.
     
     
    If this answer helped, please consider marking as verified.

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 > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 172

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 116 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans