Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
5 replies
Subscribers
8 subscribers
Views
5464 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
How to I limit a checkbox field to one choice? I am using a checkbox field to ca
judym598
Certified Senior Developer
over 9 years ago
How to I limit a checkbox field to one choice? I am using a checkbox field to capture a 'Y' or 'N' value. This works just fine unless the user checks both boxes. I tried a couple validation rules on the field but none have worked so far. Any suggestions?
a!checkboxField(
label: "Certification Required?",
labelPosition: "ABOVE",
choicelabels: {
"Yes",
"No"
},
choiceValues: {
"Y",
"N"
},
value: ri!newAgreement_cdt.certRequired,
saveInto: ri!selectedAgreement_cdt.certRequire
),
OriginalPostID-191699
OriginalPostID-191699
Discussion posts and replies are publicly visible
Parents
0
Luke Schurman
Appian Employee
over 9 years ago
load(
local!checkboxValue,
local!checkboxSave,
a!dashboardLayout(
firstColumnContents: {
a!checkboxField(
label: "Certification Required?",
labelPosition: "ABOVE",
choicelabels: {
"Yes",
"No"
},
choiceValues: {
"Y",
"N"
},
value: local!checkboxValue,
saveInto: {
a!save(target: local!checkboxValue,
value: if(and(not(rule!APN_isBlank(save!value)), length(save!value)=2),
local!checkboxValue, save!value
)),
a!save(local!checkboxSave,
local!checkboxValue
)
}
),
a!textField(
label: "Display value: user will have to click away to see second selection disappear",
value: local!checkboxValue,
readOnly: true
),
a!textField(
label: "Saved Value",
value: local!checkboxSave,
readOnly: true
)
})
)
this may be useful
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Luke Schurman
Appian Employee
over 9 years ago
load(
local!checkboxValue,
local!checkboxSave,
a!dashboardLayout(
firstColumnContents: {
a!checkboxField(
label: "Certification Required?",
labelPosition: "ABOVE",
choicelabels: {
"Yes",
"No"
},
choiceValues: {
"Y",
"N"
},
value: local!checkboxValue,
saveInto: {
a!save(target: local!checkboxValue,
value: if(and(not(rule!APN_isBlank(save!value)), length(save!value)=2),
local!checkboxValue, save!value
)),
a!save(local!checkboxSave,
local!checkboxValue
)
}
),
a!textField(
label: "Display value: user will have to click away to see second selection disappear",
value: local!checkboxValue,
readOnly: true
),
a!textField(
label: "Saved Value",
value: local!checkboxSave,
readOnly: true
)
})
)
this may be useful
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data