I am getting values from database and I am displaying it and the filter is working fine. Now the Requirement is i need to add NULL Name in dropdown and display those names that are NULL.
I am using append(local!dropdown,"NULL Name").
local!dropdown-- It has a rule that is used to display Dropdown value.
My doubt is I need to Display NULL Name dynamically, i.e: if any value is Null then only i can see this option in dropdown.
I am using below code but its wrong(as am comparing directly with NULL and value can be like: {Name1,Name2,Name3,Null}) can someone help me on this
local!dropdownList: if(local!dropdown="NULL", append("NULL Name"),local!dropdown)
Discussion posts and replies are publicly visible
You need to add logic based on your choice Values.local!choiceValue: Get all options from the source { Name1, Name 2, Name3, Null}
local!noNullChoiceValue: use reject function to discard null. Expected out put as { name1, Name2, Name3 }
local!option:
if count ( local!choiceValue ) = count ( local!noNullChoiceValue ) then pass anyone ( local!ChoiceValue or local!noNullChoiceValue)
Else append ( local!noNullChoiceValue, NULL ),
a!dropdown(.....
....
.....
Chocie Labesl:local!optionChoice Values:local!optionand on selection you know what to do when user select NULL or other options
Unknown said:local!option: if count ( local!choiceValue ) = count ( local!noNullChoiceValue ) then pass anyone ( local!ChoiceValue or local!noNullChoiceValue) Else append ( local!noNullChoiceValue, NULL ), a!dropdown(..... .... ..... Chocie Labesl:local!optionChoice Values:local!option
Chocie Labesl:local!optionChoice Values:local!option
Has anyone tried this?
I still get the error message "A dropdown component [...] has an invalid value for "choiceValues". Choice values cannot be null.". Of course local!option contains null. Or what am I missing?
I think you cannot have null as value in the dropdown instead it should be text "Null"
append ( local!noNullChoiceValue, "NULL" )
I think this is super confusing. And no, you cannot put a NULL value into the list of choice values.
But maybe if you try to explain what you want to achieve ...
Som
Is this what trying to get? If the user selects "NULL" in the dropdown, add logic to query the null values otherwise the name which is selected.