Hi,
If the change was an add, I want to write one string, if the change was an update I want to write another. Sounds simple but ive spent the last hour or more trying everything I can to try get it working and I can't work it out.
my code:
-:-<<_UPDATEMODE>> -:- <<If: (_UPDATEMODE = “Update”)>>Note updated<<EndIf>> -:-
The Result:
-:-Update -:- -:-
As expected it writes "Update", but after that its blank. ive tried square brackets around updatemode, <<>> around updatemode, with and without quotes on Update, removing the round brackets, changing from = to <> does make the text show, so that does show that the if statement is working, if they arent equal ( <> ) then it does show the text, but they are never equal. Right before the if statement im writing out the value of update mode, which is seen as Update. So I guess my issue is the left side of the equals in the if statement isn't reading the update mode value properly, or more so im not putting it in correctly.
been trying everything I can think of with no success, im sure its something very simple so any help would be great thank you!
Solved! Go to Solution.
I got it working! So as @Steve said, _UPDATEMODE is a template variable. Template variables are not available within expressions. I have then used [_THISROW_BEFORE] to check if it exists or not. If it is blank then its an added row, if it does exist then its an added row. Im not deleting records but I assume you could check if after doesn't exist and that would be a delete
Note <<If: (ISBLANK([_THISROW_BEFORE]))>>added<<EndIf>><<If: (ISNOTBLANK([_THISROW_BEFORE]))>>updated<<EndIf>> for <<[Ticket ID].[Story Type]>>: <<[Ticket ID].[Title]>>
Results in:
Note updated for Task:
Note added for Task:
User | Count |
---|---|
16 | |
12 | |
9 | |
4 | |
2 |