Login
Register
Home
Q&A
Questions
Tags
1.2k
questions
1.4k
answers
361
comments
339
users
Categories
All categories
Send feedback
Sidebar
What is the use for Channel Script Variables?
0
votes
476
views
asked
Sep 13, 2022
by
william-g-1659
(
140
points)
Are their values retained outside of the indiviual message, i.e. could be used to count certain messages based on other parameters?
channel
variables
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
0
votes
Channel Script Variables are useful for storing information that needs to be accessed by other functions. Think of them sort of like global variables. For example, if you needed to store the results of a query for use in multiple functions, or perhaps the response from an API call that more than one function needs to use. You could store that information in a Channel Script Variable.
Channel Script Variables can have two different scopes - message, and channel. Message scoped variables exist for the life of the message, but cannot be used by other messages (i.e. they are reset once the message is processed). Channel scope variables exist for as long as the channel is running; once the channel is stopped or restarted, they get reset.
Here's another KB that has some information on Script Variables:
https://www.qvera.com/kb/index.php/1680/there-way-cache-create-object-variables-mapping-functions?show=1680#q1680
answered
Sep 13, 2022
by
jon-t-7005
(
8.2k
points)
Please
log in
or
register
to add a comment.
...