- Output field: Returns a custom user property, assign a custom user property with value, or execute a custom user method defined.
<user>property = expression</user>
The user element works exactly same as "u" element except it handles custom user object.
Returns the value of JS code "user.property," which is defined under Properties, Codes tab.
property = expression
Calculates the BrainXML expression right to the equation mark; set the value of user.property as the result, in other words, execute JS code "user.property = result;"; and finally return the result.
Increases the value of property by 1 and returns the result. This only works for integer. If the property is not an integer, the property is returned as-is.
decreases the value of property by 1 and returns the result. This only works for integer. If the property is not an integer, the property is returned as-is.
Executes JS code "user.method(args);" and return the result. Depending on how the method is defined and used, the args can be empty or several comma separated arguments. The method must be pre-defined under Methods, Codes tab.
Example 1. Set and get a custom user property
- I like *
I like <user>like = <s/></user> too!
- What I like
You said you like <user>like</user>.
- I like pizza
- I like pizza too!
- What I like?
- You said you like pizza.
Example 2. Execute custom user method, without argument
- How long have we been chatting
About <user>getSessionMinutes()</user> minutes.
If you have defined user.getSessionTime() under Methods, Codes tab, the cells will work as below.
- How long have we been chatting?
- About 30 minutes.
- For built-in user property or method, check