Feb 04 2019 07:45 AM
Hi
I have a Start Date and an End Date column in my SP calendar and was wondering how I can create two new hidden columns that populate with the Last Start Date and Last End Date of the original two columns?
Thanks
Feb 04 2019 11:37 AM
Feb 04 2019 11:40 AM
@Juan Carlos González Martín wrote:
Might I ask the use of this two hidden columns? By the way: Have you tried to create calculated columns here?
I am looking to create a Flow that is triggered by a difference in value between the End Date and the Last End Date column. I did try a calculated column but every time End Date updated Last End Date updated so I think I am missing something
Feb 04 2019 11:53 AM - edited Feb 04 2019 11:53 AM
Yes, this is about the only way to detect a change in a specific field, since workflows like SP2013 and Flow don't give us access to the 'last' value of the field.
You need to create 2 separate fields - both date fields. And you have to keep them up to date in your Flow with this kind of logic. Sorry, this is pseudo code - I don't have a flow example.
If EndDate is not equal to LastEndDate
do your end date changed logic
and update the last end date field with the current end date value
Once your flow is done, both fields are the same. The next time the flow runs, if the enddate hasn't changed, you won't run the same logic again.
Feb 04 2019 11:59 AM - edited Feb 04 2019 12:01 PM
@Robin Nilsson wrote:Yes, this is about the only way to detect a change in a specific field, since workflows like SP2013 and Flow don't give us access to the 'last' value of the field.
You need to create 2 separate fields - both date fields. And you have to keep them up to date in your Flow with this kind of logic. Sorry, this is pseudo code - I don't have a flow example.
If EndDate is not equal to LastEndDate
do your end date changed logic
and update the last end date field with the current end date value
Once your flow is done, both fields are the same. The next time the flow runs, if the enddate hasn't changed, you won't run the same logic again.
Right, which is what I am trying to do with the Last End Date field as a hidden column in the SP list. My question is how do I create the Last End Date field so it copies from the End Date field but does not autoupdate when the End Date field is modified?
Oh, you mean put a flow on the Last End Date as well. Okay, that makes sense. Thanks
Feb 04 2019 12:40 PM
SolutionFeb 04 2019 12:45 PM
@Robin Nilsson Yeah, I just worked that out as I was creating the new column. Thanks for your help, everything appears to be working so far
Feb 04 2019 12:40 PM
Solution