a!save( target, value )
In interface saveInto parameters, updates the target with the given value. Use a!save for each item that you want to modify or alter in a saveInto
parameter. This function has no effect when called outside of a component's saveInto parameter.
Keyword | Type | Description |
---|---|---|
|
List of Save |
A local variable, rule input, process variable, or node input in which to save the value. Local variables that refresh on an interval using "refreshInterval" or on every evaluation, either because they are using "refreshAlways" or because they are defined in the |
|
Any Type |
The value to save. The component's updated value can be accessed using the special variable |
Save
a!save()
can be called multiple times for a given component by passing them in a list to the component's saveInto parameter.
If the component's updated value should be saved directly into a variable without modification, the a!save()
function is not necessary (see first example below).
The target and value parameters are not evaluated until the user interacts with the component.
The variable save!value
is only available in the value parameter of a!save()
. It cannot be used in the target parameter or outside of a!save()
.
If the component's updated value should be saved directly into a variable without modification, the a!save()
function is not necessary (see first example below).
a!save()
can be used in conjunction with a rule input of type Save to create reusable custom components.
Click EXPRESSION to copy and paste an example into the Interface Definition to see it displayed.
1
2
3
4
5
6
7
=a!localVariables(
local!text,
a!textField(
value: local!text,
saveInto: local!text
)
)
1
2
3
4
5
6
7
=a!localVariables(
local!text,
a!textField(
value: local!text,
saveInto: a!save(local!text, upper(save!value))
)
)
1
2
3
4
5
6
7
=a!localVariables(
local!text,
a!textField(
value: local!text,
saveInto: a!save(local!text, "You just typed: " & upper(save!value))
)
)
1
2
3
4
5
6
7
8
9
10
11
12
=a!localVariables(
local!modifiedText,
local!unmodifiedText,
a!textField(
instructions: local!modifiedtext,
value: local!unmodifiedText,
saveInto: {
a!save(local!modifiedtext, "You just typed: " & upper(save!value)),
local!unmodifiedText
}
)
)
1
2
3
4
5
6
7
8
9
10
11
12
=a!localVariables(
local!upperCaseText,
local!appendedText,
a!textField(
value: local!upperCaseText,
instructions: local!appendedText,
saveInto: {
a!save(local!upperCaseText, upper(save!value)),
a!save(local!appendedText, "You just typed: " & save!value)
}
)
)
1
2
3
4
5
6
7
8
9
10
11
12
=a!localVariables(
local!upperCaseText,
local!isModified: false,
a!textField(
value: local!upperCaseText,
instructions: if(local!isModified, "Modified", ""),
saveInto: {
a!save(local!upperCaseText, upper(save!value)),
a!save(local!isModified, true)
}
)
)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
=a!localVariables(
local!text,
local!longText: "Short Text",
local!shortText: "Long Text",
a!textField(
label: local!shortText,
instructions: local!longText,
value: local!text,
saveInto: {
local!text,
a!save(
if(
len(local!text) > 5,
local!longText,
local!shortText
),
save!value
)
}
)
)
Feature | Compatibility | Note |
---|---|---|
Portals | Compatible | |
Offline Mobile | Compatible | |
Sync-Time Custom Record Fields | Incompatible | |
Real-Time Custom Record Fields | Incompatible | Custom record fields that evaluate in real time must be configured using one or more Custom Field functions. |
Process Reports | Incompatible | Cannot be used to configure a process report. |
Process Events | Incompatible | Cannot be used to configure a process event node, such as a start event or timer event. |
a!save() Function