#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. | (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) | * 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]]" }% * 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
This topic: TWiki
>
WebHome
>
TWikiVariables
>
VarGET
Topic revision: r4 - 2012-11-13 - TWikiContributor
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
.