Display Nullvalue in Dropdown by Adding NULL Name

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

Parents
  • 0
    Certified Lead Developer

    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!option


    Choice Values:local!option


    and on selection you know what to do when user select NULL or other options

Reply
  • 0
    Certified Lead Developer

    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!option


    Choice Values:local!option


    and on selection you know what to do when user select NULL or other options

Children