Tags:
create new tag
view all tags
#VarGET ---+++ GET{"name"} -- get a variable * Get the value of a named variable, previously set with =%<nop>SET{}%=. %IF{"'%INCLUDINGTOPIC%'!='SetGetPlugin'" then="The =%<nop>SET{}<nop>%= and =%<nop>GET{}<nop>%= variables are handled by the SetGetPlugin." }% * Syntax: =%<nop>GET{ "name" default="..." }%= * Parameters: | *Parameter* | *Description* | *Default* | | ="name"= | Name of variable, such as =menu=. May optionally contain a JSON path, such as =menu.File.Open=. | (required) | | =format="..."= | Format with supported variables: %BB% =$name= for variable name %BB% =$value= for variable value %BB% =$isdefined= expanding to =1= or =0= depending if variable is defined or not %BB% =$isset= expanding to =1= or =0= depending if variable is logically true or false %BB% =$ispersistent= expanding to =1= or =0= depending if variable is persistent or not %BB% all %SYSTEMWEB%.FormatTokens such as =$dollar=, =$n=, =$percnt=. | ="$value"= | | =default="..."= | Text shown if variable is not defined, e.g. not found. This parameter overrides the format parameter. | =""= (empty string) | | =store="..."= | Specify a store name that holds the persistent variable. This assumes the variable was previously set with the same store name. | =""= | * Example: =%<nop>GET{"lunch"}%= returns =Sushi= if the following has been previously set:%BR% =%<nop>SET{ "lunch" value="Sushi" }%= %IF{"'%INCLUDINGTOPIC%'!='SetGetPlugin'" then=" - [[SetGetPlugin#SetGetExamples][see more examples]]" }% * JSON Syntax: =%<nop>GET{ name }%=%IF{"'%INCLUDINGTOPIC%'!='SetGetPlugin'" then=" - [[SetGetPlugin#JsonObjects][see description]]." }% * Example to set a JSON object and to get a JSON object with a JSON path: * =%<nop>SET{ menu = { "File": { "New": [ "new", "F" ], "Open": [ "open", "F" ] }, "Edit": { "Copy": [ "cpy", "F" ], "Paste": [ "pst", "F" ] } } }%= - set a JSON object * =%<nop>GET{ menu.File.Open }%= - returns: =["open","F"]= * Category: ApplicationsAndComponentsVariables, DevelopmentVariables * Related: [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarIF][IF]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables' OR '%INCLUDINGTOPIC%'='SetGetPlugin'" then="#"}%VarSET][SET]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables' OR '%INCLUDINGTOPIC%'='SetGetPlugin'" then="#"}%VarSETGETDUMP][SETGETDUMP]], %IF{"'%INCLUDINGTOPIC%'!='SetGetPlugin'" then="SetGetPlugin, "}%SpreadSheetPlugin#FuncGET
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r5
<
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r5 - 2015-07-10
-
TWikiContributor
Log In
or
Register
TWiki Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
AdminToolsCategory
InterWikis
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Webs
TWiki
Home
Site map
TWiki web
TWiki Web
User registration
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
InterWikis
ManagingUsers
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Account
Log In
Register User
Български
Cesky
Dansk
Deutsch
English
Español
_Français_
Italiano
日本語
한글
Nederlands
Polski
Português
Русский
Svenska
简体中文
簡體中文
E
dit
A
ttach
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.VarGET
.