User Tools

Site Tools


token:Variable

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
token:Variable [2016/12/30 03:24] peternlewistoken:Variable [2023/09/13 03:50] (current) peternlewis
Line 1: Line 1:
-{{:token:variable-icon.png |}} +===== Variable Token =====
-The //%Variable%//`<VariableName>`% token allows you to include a [[:Variables|variable]] in a [[:Text Fields |token text field]], where `<VariableName>` is the name of the variable.  +
  
 +The //%Variable%//`<VariableName>`% token allows you to include a [[manual:Variables|variable]] in a [[:Text Fields |token text field]], where `<VariableName>` is the name of the variable.
  
 For Example, using the [[action:Insert_Text|Insert Text]] Action: For Example, using the [[action:Insert_Text|Insert Text]] Action:
Line 7: Line 7:
 {{ :token:km-wiki-insert-text-action.png?nolink |}} {{ :token:km-wiki-insert-text-action.png?nolink |}}
  
-You can (v7.2+) access a variable as if it is a comma separated array of text using the notation //%Variable%//`<VariableName>[3]`% where 3 can be any [[manual:Calculations|Calculations]].  You can use a different item separator by putting the text between the ] and % characters, eg //%Variable%//`<VariableName>[3]:`%.+You can (v7.2+) access a variable as if it is a comma separated array of text using the notation //%Variable%//`<VariableName>[3]`% where 3 can be any [[manual:Calculations|Calculation]].  You can use a different item separator by putting the text between the ] and % characters, eg //%Variable%//`<VariableName>[3]:`%. In v11+, the separator is processed for backslashes, so you can use //%Variable%//`<VariableName>[3]\n`% to get the 3rd line.  Arrays are indexed starting from 1, and index 0 will give the count of the number of items, negative indices will index from the end of the array.
  
 You can also use a short form of just //%Variable Name%// to include variables as long as the variable exists and has a value and there is no corresponding text token, although generally it is better and clearer to use the longer form //%Variable%Variable Name%//. You can also use a short form of just //%Variable Name%// to include variables as long as the variable exists and has a value and there is no corresponding text token, although generally it is better and clearer to use the longer form //%Variable%Variable Name%//.
Line 15: Line 15:
 - [[:Text Fields]] - [[:Text Fields]]
 - [[:Tokens]] - [[:Tokens]]
-- [[:Variables]] +- [[manual:Variables]]
token/Variable.1483068290.txt.gz · Last modified: by peternlewis

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki