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
3 replies
Subscribers
7 subscribers
Views
3210 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Defaulted checkboxes
ryant122
over 8 years ago
Hi All
Just curious if anyone has come across a situation where, based on what is selected in a dropdown field, certain checkboxes would appear already ticked and with the value/s stored in an ri? I was able to have the default values selected based on a selected item in the dropdown field, but the value/s would not save to the ri.
Thanks in advance.
OriginalPostID-231989
Discussion posts and replies are publicly visible
0
bhanuprakashm
over 8 years ago
Hi ryant122,
It is auto selected values,so you can do one thing for this..first you can save those values local! and in the button submit u can save the local! values in ri!...
it will work.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
venkateshs329
over 8 years ago
As mentioned try below code.
Note: rule input is multiple text values
load(
local!test,
a!sectionLayout(
label: "",
firstColumnContents: {
a!dropdownField(
label: "Dropdown1",
labelPosition: "ABOVE",
choiceLabels:{"value1","Value2"},
placeholderLabel:"---Select a Value---",
choiceValues:{"value1","Value2"},
value:local!test,
saveInto: {local!test,
a!save(ri!checkBoxValues,local!test)
},
refreshAfter: "UNFOCUS",
validations: {}
),
a!checkboxField(
label: "Checkbox",
labelPosition: "ABOVE",
choiceLabels:{"value1","Value2"},
choiceValues:{"value1","Value2"},
value:local!test,
saveInto: {ri!checkBoxValues},
refreshAfter: "UNFOCUS",
validations: {}
) },
secondColumnContents: {
},
validations: {}
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 8 years ago
@ryant There isn't really a necessity for local variables for saving the value of the component in this case(as mentioned in the first comment) as it results in duplication of variables(one local and one rule input variable for each component) and it also additional logic for saving the values from local variables to rule inputs in the same or other SAIL component.
It might be worth opting for local variables in the case of choiceLabels, choiceValues and rule input variables for saving the value associated with a component. This way, Save Changes also works even if the User changes the default values associated with a SAIL component and moves out of the form by clicking 'Save Changes'.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel