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
10 replies
Subscribers
7 subscribers
Views
8074 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Selecting multiple checkbox values
rameshm
over 8 years ago
HI Team,
While selecting multiple checkbox values I am getting the below space issue
For ex: I am selecting the values A,B,C,D
value storing as A; B; C; D
Can any one provide solution..
Thanks
OriginalPostID-256301
Discussion posts and replies are publicly visible
0
Sally Mason
Appian Employee
over 8 years ago
Are you able to provide the SAIL code you are using?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rameshm
over 8 years ago
Hi Sally,
I am using Sail component.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rameshm
over 8 years ago
a!checkboxField(
label: "text",
labelPosition: "ADJACENT",
required :true,
choiceLabels: {"a","b","c","d"},
choiceValues: {"a","b","c","d"},
value: if(isnull(local!abc),{},trim(split(local!abc,";"))),
saveInto:local!abc,
validations: {})
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sally Mason
Appian Employee
over 8 years ago
Thats fine, as you mention its a spacing issue, maybe a screenshot would help us figure out what is happening? In your initial post, I cannot see anything out of the ordinary: if you select more than one choice - those choices are stored as an array, arrays in Appian are separated by ';'
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rameshm
over 8 years ago
HI Mason,
Thanks for your quick response
As our requirement is ";" after no need space between the values
Current :"A"; "B"; "C"; "D"
Expected Result: "A";"B";"C";"D"
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
divyanshm
over 8 years ago
Hi Ramesh,
The joinarray function would help you to get the expected result.
I've attached screenshots of the code. Make sure you make the variable as an array list. Hope this helps.
Cheers!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
divyanshm
over 8 years ago
Here is another shot of the output.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Rama Thummala
Certified Lead Developer
over 8 years ago
@rameshm
Yes, If we select multiple values space will be added between items for better visibility, But while retrieving elements you wont see the space before or after the item.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Rama Thummala
Certified Lead Developer
over 8 years ago
As suggested by @divyanshm , we can use join array , but the data will not be of type list any more as joinArray() returns as Text . Again we need use split() to get list structure (based on your requirement)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Schmitt
Certified Lead Developer
over 8 years ago
@ramesh: can you tell us a bit more about your requirement?
You seem to be under the impression that the result of the checkbox field selection is literally the string <<"A"; "B"; "C"; "D">>, however that is just appian's visual representation of an array of those characters created by selecting checkbox items. The only data that's really stored is that array - it's displayed (for convenience only) in the particular formatting you describe, but you are free to override that formatting per your needs, as the prior commentors have pointed out here.
I only bring this back up just to make sure you understand the fundamental concepts here, because being given a solution but not an understanding of why the solution is necessary, won't help you very much for future instances.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel