Hello all.
I want to write a snapshot of current date/time to a user cell (lets call it User.cell1), when a property cell (Prop.settime) has a change in its value. My approach was, in some other user cell named ( User.now=NOW() ), and in other cell using the formula:
SETF(GETREF(User.cell1),GETVAL(User.now))+dependson(Prop.settime)
but this writes the NOW() formula, instead of the time snapshot.
Please could you point me in the right direction? best regards.
Try changing the position of the parentheses?
SETF(GETREF(User.cell1),GETVAL(User.now)+dependson(Prop.settime))
That did the trick! ;D ;D Thank you Nikolay!
I think part of the problem with your original syntax is the GETVAL(). It's not needed.
Being bored, I took a slightly different approach and created an action entry rather than a shapedata entry. All you do is right click shape, then just click on the "Update Time", and current time value is applied. The formula is: SETF(GetRef(User.MyTime),NOW())+DEPENDSON(Actions.NowTime).
This approach only requires two entries: 1) User.MyTime to hold the time value, and 2) Actions.NowTime to invoke the time updating.
See attached.
It was fun to goof around.
Wapperdude
Hi Wapperdude, thank you for your insight. :) The approach on the action cell is also valid. The purpose on my first post wasn't to make a manual update of date/time value, but instead to make a postprocessing to that value, i.e. calculate a date/time after or a date/time before to do some tasks, like in project management, and this to be triggered by the selected value of a property cell. Or maybe triggered by some external data applied to a shape, as it writes in a property cell. But you're right, working with dates and times in Visio is a lot of fun. ;D