Basic variables question


#1

1) Give a description of the problem
How can I create a variable that shows my mobile presence?

2) What is the expected behaviour?
Put presence in a variable to send in message: Person X is “variable” (present or away)

3) What is happening/not happening?
I tried to create a global variable called @personX but messahe shows it as @personX, not its value.

4) Post a Green Snapshot of the pistonimage
(UPLOAD YOUR IMAGE HERE)

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

Depends how you are trying to send the message. If you are using the value box, variables need to be enclosed in {} to send their value. Otherwise, it is just treated as a string. In the expression box, the variable will be evaluated automatically without the {}. Anything that is now a variable in the expression box needs to be enclosed in quotes.

So in a value box you should have:

Person X is {@personX}

In an expression box, you would use:

"Person X is " @personX


#3

@guxdude has already answered the question as posed, but if you just want to send the value of the presence and don’t actually want the variable you could use an expression like "Person X is " [Mobile Device : presence] where Mobile Device is the device name (the editor will help you enter it).