Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 54 additions & 1 deletion docs/canvas/canvas-function-reference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A *** denotes a required argument.

A † denotes an argument can be passed multiple times.

<<a_fns>> | B | <<c_fns>> | <<d_fns>> | <<e_fns>> | <<f_fns>> | <<g_fns>> | <<h_fns>> | <<i_fns>> | <<j_fns>> | K | <<l_fns>> | <<m_fns>> | <<n_fns>> | O | <<p_fns>> | Q | <<r_fns>> | <<s_fns>> | <<t_fns>> | <<u_fns>> | V | W | X | Y | Z
<<a_fns>> | B | <<c_fns>> | <<d_fns>> | <<e_fns>> | <<f_fns>> | <<g_fns>> | <<h_fns>> | <<i_fns>> | <<j_fns>> | K | <<l_fns>> | <<m_fns>> | <<n_fns>> | O | <<p_fns>> | Q | <<r_fns>> | <<s_fns>> | <<t_fns>> | <<u_fns>> | <<v_fns>> | W | X | Y | Z

[float]
[[a_fns]]
Expand Down Expand Up @@ -2871,3 +2871,56 @@ Default: `""`
|===

*Returns:* `string`

[float]
[[v_fns]]
== V

[float]
[[var_fn]]
=== `var`

Updates the Kibana global context.

*Accepts:* `any`

[cols="3*^<"]
|===
|Argument |Type |Description

|_Unnamed_ ***

Alias: `name`
|`string`
|Specify the name of the variable.
|===

*Returns:* Depends on your input and arguments


[float]
[[var_set_fn]]
=== `var_set`

Updates the Kibana global context.

*Accepts:* `any`

[cols="3*^<"]
|===
|Argument |Type |Description

|_Unnamed_ ***

Alias: `name`
|`string`
|Specify the name of the variable.

|`value`

Alias: `val`
|`any`
|Specify the value for the variable. When unspecified, the input context is used.
|===

*Returns:* Depends on your input and arguments
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ export type ExpressionFunctionVar = ExpressionFunctionDefinition<
export const variable: ExpressionFunctionVar = {
name: 'var',
help: i18n.translate('expressions.functions.var.help', {
defaultMessage: 'Updates kibana global context',
defaultMessage: 'Updates the Kibana global context.',
}),
args: {
name: {
types: ['string'],
aliases: ['_'],
required: true,
help: i18n.translate('expressions.functions.var.name.help', {
defaultMessage: 'Specify name of the variable',
defaultMessage: 'Specify the name of the variable.',
}),
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@ export type ExpressionFunctionVarSet = ExpressionFunctionDefinition<
export const variableSet: ExpressionFunctionVarSet = {
name: 'var_set',
help: i18n.translate('expressions.functions.varset.help', {
defaultMessage: 'Updates kibana global context',
defaultMessage: 'Updates the Kibana global context.',
}),
args: {
name: {
types: ['string'],
aliases: ['_'],
required: true,
help: i18n.translate('expressions.functions.varset.name.help', {
defaultMessage: 'Specify name of the variable',
defaultMessage: 'Specify the name of the variable.',
}),
},
value: {
aliases: ['val'],
help: i18n.translate('expressions.functions.varset.val.help', {
defaultMessage:
'Specify value for the variable. If not provided input context will be used',
'Specify the value for the variable. When unspecified, the input context is used.',
}),
},
},
Expand Down