I have used an multiple dropdown box here and whenever i try to select more than 1 option from the multiple dropdown list it is showing this error. Can anyone please guide me through this issue kindly.Thanks and Regards.
Discussion posts and replies are publicly visible
Hi skzahed_09 ,Please check any null values are being stored in the saveInto Variable you've configured, handle the null condition.One more issue may be like the rule input data type is not an array.If both doesn't work, can you please put your code, inorder to address exact issue?
a!columnsLayout( columns: { a!columnLayout( contents: { a!multipleDropdownField( choiceLabels: {"Medical Insurance", "Vision Insurance", "Dental Insurance", "Pension Plan", "Paid Maternity Leave", "Paid Paternity Leave", "Commuter Benifits", "Disability Insurance"}, choiceValues: {"Medical Insurance", "Vision Insurance", "Dental Insurance", "Pension Plan", "Paid Maternity Leave", "Paid Paternity Leave", "Commuter Benifits", "Disability Insurance"}, label: "Benifits", labelPosition: "ABOVE", placeholder: "--- Select Benefits ---", value: ri!record['recordType!{7d604f1b-53e2-4718-9165-019b6ea8667a}IP Post Job.fields.{0774c72a-97f4-4ec1-a160-b5eaba2af359}benifits'], saveInto: ri!record['recordType!{7d604f1b-53e2-4718-9165-019b6ea8667a}IP Post Job.fields.{0774c72a-97f4-4ec1-a160-b5eaba2af359}benifits'], searchDisplay: "AUTO", required: true, validations: {} ) } ),This was my code for the particular multiple dropdown field i was facing issues.Is there anything wrong in the code ?
You can store multiple text values in a record field either by: 1. Saving them as a separator string in one text field (quick but not ideal). 2. Using a one-to-many relationship with a child table (best practice for scalability and querying).Try this as for your understanding.
a!columnsLayout( columns: { a!columnLayout( contents: { a!multipleDropdownField( choiceLabels: { "Medical Insurance", "Vision Insurance", "Dental Insurance", "Pension Plan", "Paid Maternity Leave", "Paid Paternity Leave", "Commuter Benifits", "Disability Insurance" }, choiceValues: { "Medical Insurance", "Vision Insurance", "Dental Insurance", "Pension Plan", "Paid Maternity Leave", "Paid Paternity Leave", "Commuter Benifits", "Disability Insurance" }, label: "Benifits", labelPosition: "ABOVE", placeholder: "--- Select Benefits ---", value: if( a!isNullOrEmpty( ri!record['recordType!{7d604f1b-53e2-4718-9165-019b6ea8667a}.fields.{0774c72a-97f4-4ec1-a160-b5eaba2af359}'] ), ri!record['recordType!{7d604f1b-53e2-4718-9165-019b6ea8667a}.fields.{0774c72a-97f4-4ec1-a160-b5eaba2af359}'], split( ri!record['recordType!{7d604f1b-53e2-4718-9165-019b6ea8667a}.fields.{0774c72a-97f4-4ec1-a160-b5eaba2af359}'], "; " ) ), saveInto: ri!record['recordType!{7d604f1b-53e2-4718-9165-019b6ea8667a}.fields.{0774c72a-97f4-4ec1-a160-b5eaba2af359}'], searchDisplay: "AUTO", required: true, validations: {} ) } ) } )
There was this error saying there was an unmatched close bracket i tried but all the closed brackets were correctly close. Is there any other error iam missing.
You've missed one of the brace, try to debug checking each brace's scope
You might be missing somewhere.
I would suggest going to an earlier version when you shared this code, collapsing the columnLayout, and paste the code below to replace it.
a!columnLayout( contents: { a!multipleDropdownField( choiceLabels: { "Medical Insurance", "Vision Insurance", "Dental Insurance", "Pension Plan", "Paid Maternity Leave", "Paid Paternity Leave", "Commuter Benifits", "Disability Insurance" }, choiceValues: { "Medical Insurance", "Vision Insurance", "Dental Insurance", "Pension Plan", "Paid Maternity Leave", "Paid Paternity Leave", "Commuter Benifits", "Disability Insurance" }, label: "Benifits", labelPosition: "ABOVE", placeholder: "--- Select Benefits ---", value: if( a!isNullOrEmpty( ri!record['recordType!{7d604f1b-53e2-4718-9165-019b6ea8667a}.fields.{0774c72a-97f4-4ec1-a160-b5eaba2af359}'] ), ri!record['recordType!{7d604f1b-53e2-4718-9165-019b6ea8667a}.fields.{0774c72a-97f4-4ec1-a160-b5eaba2af359}'], split( ri!record['recordType!{7d604f1b-53e2-4718-9165-019b6ea8667a}.fields.{0774c72a-97f4-4ec1-a160-b5eaba2af359}'], "; " ) ), saveInto: ri!record['recordType!{7d604f1b-53e2-4718-9165-019b6ea8667a}.fields.{0774c72a-97f4-4ec1-a160-b5eaba2af359}'], searchDisplay: "AUTO", required: true, validations: {} ) } ) } )
It won't work as the multiple dropdown selects multiple values and your record field is not an array,It refers one to many relationship between the values in variable and record field.In-order to achieve this you need to create a local variable, Save the value in local variable and then in submit button you need to iterate the multiple dropdown values into rule input.For detailed explanation, Refer - docs.appian.com/.../Multiple_Dropdown_Component.htmlor you can just append with ";" or "," into single field as typecasting them to single text.This will surely work!!!Let me know if you still face the issue.