Hi Everyone,I am getting error in the dropdown field,i have called 3 dropdown fields in interface level when i am selecting the value from 1st dropdown am getting error like this and this dropdown is 2nd and also i have passed the values and labels same only still i am getting error like this (the data is saving in the child records i have used parent records to pass the data to child )
Discussion posts and replies are publicly visible
Hi ,
Here’s what I understand from the attached query and snippet:
Are you using dependent dropdowns? If the value of Dropdown 2 should depend on Dropdown 1 (i.e., the choice labels/values in Dropdown 2 change based on the selection in Dropdown 1), try setting the value of Dropdown 2 to null in the saveInto parameter of Dropdown 1. This will reset Dropdown 2 whenever the selection in Dropdown 1 changes.Alternatively, if it's just a single dropdown, you can try using a toString type cast or an if(isNull(val),{},val) statement to handle null values.Let me know if this helps! Or, if you're still facing issues, feel free to share the complete code snippet and provide a bit more context for a more detailed analysis.
null
saveInto
toString
if(isNull(val),{},val)
You can use local variables in savento then you can map local variables with rue input. a!localVariables( local!save, { a!dropdownField( choiceLabels: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, choiceValues: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, label: "Dropdown", labelPosition: "ABOVE", placeholder: "--- Select a Value ---", value: local!save, saveInto:{ local!save, a!save( ri!save, local!save ) }, searchDisplay: "AUTO", validations: {} ) } )
a!localVariables( local!save, { a!dropdownField( choiceLabels: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, choiceValues: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, label: "Dropdown", labelPosition: "ABOVE", placeholder: "--- Select a Value ---", value: local!save, saveInto:{ local!save, a!save( ri!save, local!save ) }, searchDisplay: "AUTO", validations: {} ) } )
no i am not using dependent dropdown.
Hi
Did you get solution for this?
Hi , Could you please send the snippet of your code, as I need to check the 'saveinto' parameter and the rule input that you created
Some appian components are picky between "true null" (where the value = NULL aka "null()"), versus merely "blank text", i.e. when the value = "".
To test this, temporarily replace your "value" parameter with "null()" instead of the value you're trying to reference. Does the error go away, and you see your placeholder text as expected? That means it doesn't like the value you're currently trying to pass in by default.
got it thanks...
you can also add the check if value of variable is null then proper null will be used else use the variable.