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
does the error says this?
a!localvariable( local!Value:rule!PP_ChoiseValues_PrimaryProduct(input: ri!record['recordType!{65daf38b-046b-457b-930c-521bbccdc1d0}PP Type.fields.{263d05f5-db7e-469f-b4bc-f41ee5d40137}primaryproduct']), a!multipleDropdownField( choiceLabels: { cons!PP_PrimaryProduct_Choices }, choiceValues: { cons!PP_PrimaryProduct_Choices}, label: "Primary Products:", labelPosition: "ADJACENT", placeholder: "----------- Select your Primary Product ------------", value:local!Value, saveInto: {local!value} ) )
split(ri!input,";")
error:
Hi antogladvinj3315 can try this code and let me know?
a!localVariables( local!save, local!data: {"P1",P2"}, local!choiceLabels : split(local!data,","), { a!multipleDropdownField( choiceLabels:local!choiceLabels, choiceValues: local!choiceLabels, label: "Multiple Dropdown", labelPosition: "ABOVE", value: local!save, saveInto: {local!save, a!save(local!save,save!value)}, searchDisplay: "AUTO", validations: {} ) } )
Thanks,
Initially I need to display the value ie: local!save should have value to display my previous input
can you please clarify if the data is in this format ->
"p1;p2"
"p1,p2"
split(local!data,";")
use ";" in split , try this ->
a!localVariables( local!value:"Option 1;Option 2"; local!splitedValue: split(local!value,";"), { a!multipleDropdownField( choiceLabels: { "Option 1", "Option 2", "Option 3" }, choiceValues: { "Option 1", "Option 2", "Option 3" }, value: local!splitedValue, label: "Multiple Dropdown", labelPosition: "ABOVE", saveInto: {local!splitedValue}, searchDisplay: "AUTO", validations: {} ) } )
Your are right , But it is not working, I am calling it from record, I don't know why it is not working
could you please give us a screenshot of local variable value , where temp local variable should contain this value :
ri!record['recordType!{65daf38b-046b-457b-930c-521bbccdc1d0}PP Type.fields.{263d05f5-db7e-469f-b4bc-f41ee5d40137}primaryproduct']