Table of Contents

Modify Variable Action

Modify Variable Action is a useful action that can alter rule variable values. Actions that works after this action uses altered values.

Parameter NameDescription
Variable NameThe name of the variable we want to change
FindValue we want to change
ReplaceValue we want to use instead

Use Cases

Variable ValueFindReplaceResult
SambaPOS<empty>BestBest
SambaPOSSambaBestBestPOS
SambaPOSS(.*)SBestBest
SambaPOS<empty(S.*)POSSamba

On last two cases we used Regular Expressions.

Example

Suppose you are using NumberPad Value Entered rule to scan customer cards through magnetic card reader. Some card scanners sends mag card data between ; and ? characters. As you know we can read entered number with NumberpadValue parameter so before using NumberpadValue parameter you might want to trim these characters.

[;|%](.*)\? regular expression trims starting ; or % char and ending ? character. If we call this action before using NumberpadValue in Numberpad Value Entered rule we'll read trimmed value.