Hii,
In my case i have to edit the multiple Dropdown field value:
the value from my record type is like : "Product 1,Product 2".
So, value is not matching with choice value. How to resolve this, I tried converting the value to list of text using split but still it is not working.
Discussion posts and replies are publicly visible
Hi antogladvinj3315,
You are storing the data in a single text format. For the dropdown values it has to be list of array items. Try this code it will help.
a!localVariables( local!data:"Product 1,Product 2", local!DropDownData:split(local!data,","), a!multipleDropdownField( label: "Dropdown", placeholder: "Select", choiceLabels: {"Product 1","Product 2","Product 3"}, choiceValues: {"Product 1","Product 2","Product 3"}, value: local!DropDownData, saveInto: local!DropDownData ) )
Thanks for your response, It didn't Work,
a!localvariable(
local!Record:ri!record['recordType!{65daf38b-046b-457b-930c-521bbccdc1d0}PP Type.fields.{263d05f5-db7e-469f-b4bc-f41ee5d40137}primaryproduct'],
local!Split: Split(local!Record,";"),
)
Value:
local!Record - "Product 11; Product 10"(Text)
local!Split -
"Product 11"(Text)
" Product 10"(Text)
Used as value in multiple dropdown, but same issue
I got the issue, It is a space occurring in Value ie: "Product 1; Product 2" , but choice value is "Product 1" "Product 2"
Space issue: yellow marked area
In constant i have
split(local!value,"; ")
Hello antogladvinj3315 ,
If you are using constants for both choiceLabel and choiceValues then why are you initially fetching record data in the local!value and trying to save the selected values in the same local variable. This will override the initial value in local!value. Do you want to update the record based on the selection from multipledropdownfield() ? And what values are provided in the constants you are using?
Yes, I want to update the record
Initially, I will use this drop down and select some product and submit.
later i want to edit this Product names so, While iam chaning or if it is more that one product name it is giving this error.
The issue is after saving on first it is producing some space i don't know how
if you carefully see in the value there is a extra space between both values
While getting the list use trim() function to remove the unwanted spaces or in split(list,"; ") try this method
Thanks It worked
Then define a separate local variable to save the values from multipledropdownfield() (not in local!value). And update your record using saveinto in a button action field.