Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Workflow based on calculated fields

Posted on by 212

I want to change my two option set field to yes if the today date and reference date are equal both today date and reffernce date are calculated fields , reference date is 3 days less than the due date. but my workflow didnt update option set field "add to email" to yes

2548.ss1.PNG

8712.sss.PNG

 Today date and reference date are same but it didn't updated my field to yes. and workflow is trigered on creation of task and it waits then for 4 minutes 

  • Suggested answer
    Naveen Ganeshe Profile Picture
    Naveen Ganeshe 3,393 User Group Leader on at
    RE: Workflow based on calculated fields

    Hello Fariha,

    We can compare calculated fields in a workflow but in your scenario, it's not a good idea as David  said "they have both a date and a time component, and both would have to be identical".

    However, if you still want to compare, then change the both field's behavior to "Date Only".

  • Fariha Asmat Profile Picture
    Fariha Asmat 212 on at
    RE: Workflow based on calculated fields

    David,

    Thanks for the reply but I cannot use the timezone Independent date as I need to compare the Task Due date field which is  Timezone dependent and  Date and time type of field.

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Workflow based on calculated fields

    In general, it is not a good idea to test if 2 date time fields are equal to each other, as they have both a date and a time component, and both would have to be identical. As per a previous post, you may be able to get this to work by making them Date only or timezone independent, but a more robust approach would be to create another calculated field using a DateDiff to get the difference in days between the dates, and put the condition on that field

  • Fariha Asmat Profile Picture
    Fariha Asmat 212 on at
    RE: Workflow based on calculated fields

    the fields are date and time  and are calculated fields. Can we compare calculated fields in a workflow ?. I mean my actual scenario is  I want to update 2 option set type field to "YES"when there is only 3 days left in due date of the task. For this Im using a reference Field which is the set to 3 days less than the due date and another date time type field for today date(current date) . Now Im using the approach if today date and reference date is same means there are only 3 days left in the due date of the task then my option set field will update to YES

  • Suggested answer
    Naveen Ganeshe Profile Picture
    Naveen Ganeshe 3,393 User Group Leader on at
    RE: Workflow based on calculated fields

    Hello Fatma,

    Can you tell me what is the behavior(Date-time or Date only or timezone independent) of both the fields?

    If behavior is date-time then try to change it to "Date Only" and run the workflow again.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans