Unusual behaviour on changes to data in a column

I’m trying to recreate the functionality of a ChangeTimestamp column so the user can edit the DateTime if required. An option not allowed on ChangeTimestamp columns. Here are the columns involved:

[PF1] = ENUM with one option - “Done”
[Res1PicTS] = DateTime column with following options:

Initial Value
IF([_THISROW_BEFORE].[PF1]<>[_THISROW_AFTER].[PF1],Now(),[Res1PicTS])

Reset If
[_THISROW_BEFORE].[PF1]<>[_THISROW_AFTER].[PF1]

So it should update [Res1PicTS] with Now() if [PF1] changes.

The weird thing is this works only when changing [PF1] from “Done” to “” but not the other way around. If you set [PF1] to “Done” then [Res1PicTS] does not get updated to Now(). Even tried changing the Intial Value to just Now(), with the same results. So it seem the Reset IF code doesn’t work when changing from blank to not blank. But I can’t see why not.

Any ideas?

0 9 334
9 REPLIES 9

I’m afraid you can’t use [_THISROW_BEFORE] syntax with columns. They only work with Workflows and Reports.

Ok, is there another way to create a ChangeTimestamp type column that allows the App user to change the datetime created?

So this gets weirder…

After consulting with the client, we’ve gone back to a standard ChangeTimestamp column. But the same weird behaviour above still occurs.

Columns
[PF1] = ENUM with one option - “Done”
[Res1PicTS] = ChangeTimestamp looking at PF1

Test Routine
1 = Change [PF1] from blank to done
2 = [Res1PicTS] shows the changed time
3 = Change [PF1] from done back to blank, [Res1PicTS] disappears. Which is odd because the Show_IF rule simply says ISNOTBLANK([Res1PicTS]). So why clearing a value in an ENUM column should clear the ChangeTimestamp column too is a mystery.
4 = So left [PF1]=“Done” and saved
5 = Went back in to edit the record. [Res1PicTS] is showing the correct time that [PF1] was changed.
6 = Changed [PF1] back to blank. This time [Res1PicTS] correctly timestamps this change, unlike 3 above where is disappeared
7 = Changed [PF1] back to “Done”, [Res1PicTS] now show the timestamp it had at 2 above !!! How does that happen?
6 = Changed [PF1] back to blank. [Res1PicTS] again correctly timestamps this change to the current time, a few seconds after 6
8 = Changed [PF1] back to “Done”, [Res1PicTS] shows the timestamp it had at 2 and 7 above.

What is going on ??? @Steve @Aleksi any ideas or recent changes?

I’ve cleared my cache and the problem is the same

#3 - It happens because you haven’t save the record yet.
#7 - For the same reason.

But I’m getting two diffferent outcomes depending on whether [PF1] starts with a value or not when I edit the row. This is surely not right?

It doesn’t matter what the Enum field’s value is… I mean does it have value or is it a blank. When you open the record, it will record timestamp only, if you have changed it’s value from the last save. If you change it back as it was, nothing has changed and timestamp is not changed either.

You probably think that it should change the timestamp every time when you click that Enum button… but the ChangeTimestamp doesn’t work in that way. It only records the new timestamp if the value is different than it was when you opened the record.

That does explain the situation

Excellent

Top Labels in this Space