Unable to find column '_THISROW_BEFORE'

(Michael) #1

Anyone have an idea why I may be seeing this? I’m trying to compare before and after values and seeing this error…

Error in expression ‘[_THISROW_BEFORE].[Compare]’: Unable to find column ‘_THISROW_BEFORE’

(Levent Kulacoglu) #2

[_THISROW_BEFORE] and [_THISROW_AFTER] de-refs can only be used in workflow rules’ conditional statements. Where are you trying to use it?

1 Like
(Michael) #3

@LeventK Shortly after posting I realized your point. I returned here to add that and noticed you were replying. I love that about this new forum; another reason I think its better than G+.

Is there a simple way to compare before and after values in a table?

I have an expression in a particular field. The expression updates the field’s value if the view is opened in edit mode. This expression changes the field’s value even if no other field is changed. This is intentional and works as expected.

I have an action button that updates another field. This action is available from the detail view. Using this action to update a field causes the expression in the other field to update as well.

In short; I want one field to update when the view is opened in edit mode and another to update only when the user clicks a corresponding action. Ideas?

(Levent Kulacoglu) #4

Hi @Michael
I believe you can log the change, however I’m not sure if it suits your needs because I have no idea about your app. What you are asking is very similar to @MauriceWhelan’s query. Check my sample app below and you are also free to copy it from my portfolio as well:

(Steve Coile) #5

In App formula:

IF((CONTEXT("ViewType") <> "form"), [_THIS], ...)

If not in a form view (i.e., if viewing the row by any other means), keep the existing value ([_THIS]), otherwise do something else (..., replace as desired).

(Michael) #6

Thanks @Steve. Your expressions seems to work well. I haven’t had much luck using the CONTEXT() function aside from here.

Have you tried using it for hiding/displaying actions? Based on the user’s device?

(Steve Coile) #7

I have not. Note that CONTEXT() does not (to my knowledge) give you any insight into the type of device the user has. The best you can do is differentiate between app (which implies device, but no specifics), web browser (which could be computer or device), and server.