Match changes the value of a variable based on criteria that you set. This is similar to the 'switch statement' programming concept.
Configuring it
Match requires a variable to supply a value, you add this to the Input section at the top. It can be a global or custom variable. The value is then used in the Possible match value(s) section. This section evaluates and changes the value based on conditions you set. To set a condition, click +Add.
Fill in your criteria here. This works in a similar way to the operators in a Condition workflow item.
| Select an operator | Choose from the list of operators, these will dictate how your value is compared to your Value to match. For example, if "contains" is selected, it will see if your value contains the text you enter in Value to match. |
| Value to match | The information your value will be compared against. |
| Result | This is what your value will be changed to if it meets your criteria. |
Here's an example:
In this example, if your value is "Failed" then it will be converted to "Overdue".
You can add multiple possible match values to the item.
In this example, we're using multiple match criteria to convert "Failed", "Partially failed" and "Incomplete" to "Overdue". If we had used a condition workflow item instead, we'd need to have created three different conditions and potentially duplicated the workflow items following each of them. This match item significantly simplifies the workflow.
Beneath your Possible match values, you can set a Default. This is what the value will be set to if it doesn't meet any of the criteria you've set up. If you wanted the value to remain unchanged, you could always set the Default to the same variable as the one you used as your input:
Finally, at the bottom of the workflow item, you have the Result. Here you specify which custom variable you would like to be populated with the new value.
You could have the new value populate the same variable that you started with:
Or you could populate an entirely new variable.
