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
2 replies
Subscribers
7 subscribers
Views
1673 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi All, I need to implement a multi-select checkbox field. Users shou
aswinb
over 11 years ago
Hi All,
I need to implement a multi-select checkbox field. Users should be able to select multiple values and also may not select any fields. when they select a particular field a boolean flag is set inside the database. So each values in the checkboxfield will have a corresponding boolean flag in the database that correspond to this. All these flags are inside a CDT called "pendingCompany" and for example a sample flag would be called like pendingCompany.CompanyIsDistributor and this boolean flag would be set a value of "1" if they checked the option "distributor". My problem is I have passed in all these values as constants to the choiceLabels and choiceValues field. But I don't know what to pass in for the "value" field. so I passed in an empty array called "local!value:{}". And i have a bunch of if statements that checks if the value that is being captured is in any of the constants. If it is then i pass in a value of "1" using the cheveron op...
OriginalPostID-107346
OriginalPostID-107346
Discussion posts and replies are publicly visible
Parents
0
aswinb
over 11 years ago
...erator. But so far I am getting a javascript error when i select on any option. Cany anybody help. This is the code:
local!values{},
a!checkboxField(
label:"Location Type",
choiceLabels:{cons!PSA_Company_Location_Types[1], cons!PSA_Company_Location_Types[2], cons!PSA_Company_Location_Types[3], cons!PSA_Company_Location_Types[4],
cons!PSA_Company_Location_Types[5],
cons!PSA_Company_Location_Types[6],
cons!PSA_Company_Location_Types[7],
cons!PSA_Company_Location_Types[8]},
choiceValues:{{cons!PSA_Company_Location_Types[1], cons!PSA_Company_Location_Types[2], cons!PSA_Company_Location_Types[3], cons!PSA_Company_Location_Types[4],
cons!PSA_Company_Location_Types[5],
cons!PSA_Company_Location_Types[6],
cons!PSA_Company_Location_Types[7],
cons!PSA_Company_Location_Types[8]},
value:local!values,
saveInto:{ri!pendingCompany.CompanyIsManufacturer << if(contains(_, cons!PSA_Company_Location_Types[1]), 1,0), ri!pendingCompany.CompanyIsRetailer << if(contains(_,cons!PSA_Comp...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
aswinb
over 11 years ago
...erator. But so far I am getting a javascript error when i select on any option. Cany anybody help. This is the code:
local!values{},
a!checkboxField(
label:"Location Type",
choiceLabels:{cons!PSA_Company_Location_Types[1], cons!PSA_Company_Location_Types[2], cons!PSA_Company_Location_Types[3], cons!PSA_Company_Location_Types[4],
cons!PSA_Company_Location_Types[5],
cons!PSA_Company_Location_Types[6],
cons!PSA_Company_Location_Types[7],
cons!PSA_Company_Location_Types[8]},
choiceValues:{{cons!PSA_Company_Location_Types[1], cons!PSA_Company_Location_Types[2], cons!PSA_Company_Location_Types[3], cons!PSA_Company_Location_Types[4],
cons!PSA_Company_Location_Types[5],
cons!PSA_Company_Location_Types[6],
cons!PSA_Company_Location_Types[7],
cons!PSA_Company_Location_Types[8]},
value:local!values,
saveInto:{ri!pendingCompany.CompanyIsManufacturer << if(contains(_, cons!PSA_Company_Location_Types[1]), 1,0), ri!pendingCompany.CompanyIsRetailer << if(contains(_,cons!PSA_Comp...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data