Tip: Interface patterns give you an opportunity to explore different interface designs. Be sure to check out How to Adapt a Pattern for Your Application.
Set the value of a CDT field based on a user input.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
a!localVariables(
local!myCdt: 'type!{http://www.appian.com/ae/types/2009}LabelValue'(),
a!formLayout(
label: "Example: Default Value Based on User Input",
instructions: "local!myCdt: " & local!myCdt,
contents: {
a!textField(
label: "Label",
instructions: "Value saved: " & local!myCdt.label,
value: local!myCdt.label,
saveInto: {
local!myCdt.label,
a!save(local!myCdt.value, append(save!value, "@example.com"))
},
refreshAfter: "KEYPRESS"
),
a!textField(
label: "Value",
instructions: "Value saved: " & local!myCdt.value,
value: local!myCdt.value,
saveInto: local!myCdt.value,
refreshAfter: "KEYPRESS"
)
},
buttons: a!buttonLayout(
primaryButtons: a!buttonWidget(
label: "Submit",
submit: true
)
)
)
)
localVariables()
functionlocal!myCdt
local!myCdt
with ri!myCdt
Set the Default Value of CDT Fields Based on a User Input