Crow Canyon Software Forum
Getting before and after change values for a column
Quote from pf-amalin on July 1, 2025, 7:31 pmWe can set a condition to execute a workflow when a column changes by using afterchange:[[Any]]. Is there a way to get the values for beforechange: and afterchange: to use later in the workflow?
Thank you.
We can set a condition to execute a workflow when a column changes by using afterchange:[[Any]]. Is there a way to get the values for beforechange: and afterchange: to use later in the workflow?
Thank you.
Quote from supportTeam on July 2, 2025, 8:39 amHi Art,
You can use the "Get Column Value for Version" function in the Workflow to get the previous and latest values of a column and store them in a variable. Please refer to this article for more details https://www.crowcanyon.help/article/708/
Hi Art,
You can use the "Get Column Value for Version" function in the Workflow to get the previous and latest values of a column and store them in a variable. Please refer to this article for more details https://www.crowcanyon.help/article/708/
Quote from pf-amalin on July 2, 2025, 11:24 amThat article says, "Function ‘getcolumnvalueforversion’ can be used to get the column value for a version enabled multiple lines of text column." The column I need the before and after values is a choice column.
For example, if I add a Gateway control and test "ItemStatus", it properly displays the "Before value" and "After value" (Pending and Approved respectively):
=================
Begin action execution ...
=================
Action Title: Before Pending
Action Type: Gateway
Condition information:
-----------------
Column name: "ItemStatus"
Condition operator: "Equal"
Condition value expression: "Pending"
Comparison Type: "Before Change"
-----------------
Condition evaluation information:
-----------------
Before Value: "Pending"
After Value: "Approved"
Condition evaluation information:
-----------------
Column value: "Pending"
Operator: "Equal"
Condition evaluated value: "Pending"
-----------------
Result: true
-----------------
Conditions evaluation result: true
Conditions matched: "true"
Successfully Executed
--- I'm trying to determine if I can capture "Before value" and "After value" for further processing, including adding to an email.
Thank you!
That article says, "Function ‘getcolumnvalueforversion’ can be used to get the column value for a version enabled multiple lines of text column." The column I need the before and after values is a choice column.
For example, if I add a Gateway control and test "ItemStatus", it properly displays the "Before value" and "After value" (Pending and Approved respectively):
=================
Begin action execution ...
=================
Action Title: Before Pending
Action Type: Gateway
Condition information:
-----------------
Column name: "ItemStatus"
Condition operator: "Equal"
Condition value expression: "Pending"
Comparison Type: "Before Change"
-----------------
Condition evaluation information:
-----------------
Before Value: "Pending"
After Value: "Approved"
Condition evaluation information:
-----------------
Column value: "Pending"
Operator: "Equal"
Condition evaluated value: "Pending"
-----------------
Result: true
-----------------
Conditions evaluation result: true
Conditions matched: "true"
Successfully Executed
--- I'm trying to determine if I can capture "Before value" and "After value" for further processing, including adding to an email.
Thank you!
Quote from supportTeam on July 2, 2025, 2:55 pmHi Art,
"Function ‘getcolumnvalueforversion’ can be used to get the column value for a version enabled multiple lines of text column." The column I need the before and after values is a choice column
Choice column is also supported in the function 'getcolumnvalueforversion'. The above article only uses the 'multiple lines of text' column as an example
Please let us know if you're updating the 'ItemStatus' column in the workflow, or just trying to retrieve its previous value, so we can advise accordingly.
Hi Art,
"Function ‘getcolumnvalueforversion’ can be used to get the column value for a version enabled multiple lines of text column." The column I need the before and after values is a choice column
Choice column is also supported in the function 'getcolumnvalueforversion'. The above article only uses the 'multiple lines of text' column as an example
Please let us know if you're updating the 'ItemStatus' column in the workflow, or just trying to retrieve its previous value, so we can advise accordingly.
Quote from pf-amalin on July 2, 2025, 3:19 pmThe need right now is for determining the before and after values. We might want to update the status in the future if it's straightforward, but not needed at this point.
Thanks!
The need right now is for determining the before and after values. We might want to update the status in the future if it's straightforward, but not needed at this point.
Thanks!
Quote from supportTeam on July 3, 2025, 2:11 pmHi Art,
If the 'ItemStatus' column is not being updated by the workflow, you can use the getcolumnvalueforversion function to store its previous value in a variable. The current (after) value can be directly stored in another variable, as it reflects the latest value of the column.
To capture the before value in a variable:
- Open the workflow
- Click on ‘variables’ on the top → Click on ‘New variable’ → name it as ‘varBefore’
- Click on hamburger icon beside ‘Default value’ to open the expression builder and configure it as shown in image 1
- Click on ok and save the variable
To capture the after value in a variable:
- Open the workflow
- Click on ‘variables’ on the top → Click on ‘New variable’ → name it as ‘varAfter’
- Click on hamburger icon beside ‘Default value’ to open the expression builder and configure it as shown in image 2
Hi Art,
If the 'ItemStatus' column is not being updated by the workflow, you can use the getcolumnvalueforversion function to store its previous value in a variable. The current (after) value can be directly stored in another variable, as it reflects the latest value of the column.
To capture the before value in a variable:
- Open the workflow
- Click on ‘variables’ on the top → Click on ‘New variable’ → name it as ‘varBefore’
- Click on hamburger icon beside ‘Default value’ to open the expression builder and configure it as shown in image 1
- Click on ok and save the variable
To capture the after value in a variable:
- Open the workflow
- Click on ‘variables’ on the top → Click on ‘New variable’ → name it as ‘varAfter’
- Click on hamburger icon beside ‘Default value’ to open the expression builder and configure it as shown in image 2