Usage:
This shortcode provides the ability to compare any two values based on a number of comparison operators.
Any two values may be compared. The values may be hardcoded or be other shortcodes, custom shortcode parameters and session variables.
[ELSE_compare] conditional branching is supported.
Shortcode nesting is supported:
[mbr_compare1] thru [mbr_compare19]
[ELSE_compare1] thru [ELSE_compare19]
Parameters:
value1 | The name of a contact field or custom field shortcode, a custom shortcode parameter or a hardcoded value, which will be compared to value2 based on the comparison operator. Default: none. Required: yes. |
cmp | The comparison operator, as listed below. Default: none. Required: yes. |
value2 | The name of a contact field or custom field shortcode, a custom shortcode parameter or a hardcoded value, which will be compared to value1 based on the comparison operator. Default: none. Required: yes. |
The comparison operators are:
equal | == | OR | EQ |
greater than | > | OR | GT |
less than | < | OR | LT |
greater or equal | >= | OR | GE |
less or equal | <= | OR | LE |
not equal | <> | OR | NE |
begins with | ~= | OR | BW |
end with | =~ | OR | EW |
contains | ~~ | OR | CONTAINS |
Example:
[mbr_compare value1='[mbr_db_firstname]' cmp='EQ' value2='Bob'] Hello Bob! [ELSE_compare] Hello Friend! [/mbr_compare]
API:
There is currently no ActiveMember360 API function equivalent for this shortcode.