[_THISROW_BEFORE]

I need to create an action that is triggered when a date field is changed in any way. I have set up the action using this expression:

[_THISROW_BEFORE].[Assess Date] <> [_THISROW_AFTER].[Assess Date]

It works when there is an existing date in the field, and that date changes. It doesn’t trigger the action if the date field is blank and then there is a date entered. How do I code it so both situations work?

Thanks, Wick

Try this:

IF(
  ISBLANK([Assess Date]),
  ISNOTBLANK([_THISROW_BEFORE].[Assess Date]),
  ([Assess Date] <> [_THISROW_BEFORE].[Assess Date])
)

Note that [_THISROW_AFTER].[Assess Date] and [Assess Date] refer to the same value.

1 Like

I do not believe the BEFORE/AFTER row states are accessible from actions. it worked in your one use case because “not there” is treated the same as “is blank” and [_THISROW_AFTER] is the same as the current row state.

To do this you will want to add to your table a “ChangeCounter” type column. This column can be configured to track changes to the row or a certain set of 1 or more configured columns. It tracks changes in two ways:

  1. Track running total of changes.
  2. Change indicator. In this case, each time the row is edited, the column is reset. Zero (“0”) means no changes and “1” means changed.

In your case you want to use the column as a Change Indictor for [Assess Date] column. So, if you named this new column as “Assess Date Changed”, then you would only need to insert into your action Behavior: [Assess Date Changed] = 1.

I hope this helps!

2 Likes