cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zstoes
Regular Visitor

Set date and time for column when the value of a different column is changed within a model driven app

I have one column called "Key Sent" which is a Yes/No data type. The default value is "no". I want to record the time when a user changes this column from 'no' to 'yes'.

 

To try to solve this I created another column called "Key Sent On" and I made it a calculated field where if the value of "key Sent" was yes then "Key Sent On" would get NOW(). However, NOW() only give the users current time and constantly changes as time goes on.

 

I'm not sure how to approach this now. Do I make a workflow within the business process flow of the overall data type? Do I make an automated  cloud flow in power automate? Do I make a business rule? I tried these but I ran into different issues with each of them.

 

I feel like having a calculated column would be the easiest but I don't know how to stop the calculation or only make the column calculate when the value of "Key Sent" is changed from "no" to "Yes".

3 REPLIES 3
BCLS776
Super User
Super User

What is currently changing the Key Sent column value to a "Yes"? Can you have that same process update your Key Sent On timestamp?

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
zstoes
Regular Visitor

The user is manually changing "Key Sent" to yes. I guess the user could also manually input the date, but it would be nice if they didn't have to.

 

I also want to have other parts of the business process flow be time stamped liked this. I feel like all that data will not be collected if it is up to the user to input all of the dates.

OK, I know business rules won't work here, because you can't put a function like Now() into a value-setting field. I'd try a cloud flow for when a "Dataverse row is added, modified or deleted". That type of flow can be filtered to activate only on changes to the Key Sent column (and filter further still to when it is marked "yes") and then you can use an update row block to set the time for the Key Sent On using utcnow() and adjusting for your time offset.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,695)