Info |
---|
|
This routine is available starting with Power Scripts™ for Confluence v1.1.0. |
Syntax
getPersistentVar(pageId, varName) // get page persistent variable
getPersistentVar(varName) // get global persistent variable
Description
Excerpt |
---|
Gets the specified persistent variable as a string. |
Parameters
Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | getPersistentVar([issue, ]varName) | Package | | Alias | | Pkg Usage | | |
Description
Excerpt |
---|
|
Gets the persistent var, as a string |
Gets the persistent var, as a string
Parameters
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
|
...
...
...
...
...
the variable introduced via 'persistent' keyword |
|
Return
...
Type
string
Returns the value of the specified persistent variable.
Examples
Example 1
This example gets the value of the page persistent variable named "pageViews".
Code Block |
---|
const string varName = "pageViews";
const number pageId = getPage("TEST", "Example page");
const number pageViews = getPersistentVar(pageId, varName); // conversion from string to number is performed automatically |
Example 2
This example gets String
Returns the value of the global persistent variable named "globalCounter".
...
...
const string varName = "globalCounter";
const number globalCounter = getPersistentVar(varName); // conversion from string to number is performed automatically
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "pssystem_conf"routine" and space = currentSpace ( ) |
---|
labels | jiraarray_comment_routineroutines |
---|
|