Skip to main content
kavyam0002
Brainy
Feb 10, 2022 8:31 AM UTC
Solved

multiple dropdown

Hi, 

i have multiple dropdown field...

i made that to reusable...

it's working in other places and only in one place it's showing error for choice vales 

error

can anyone help with this?

Thanks

    harshitb6843
    Brainy
    Feb 10, 2022 10:21 AM UTC

    Hi there,

    According to the error, the choiceValues is null. 
    Try printing the choice values on the screen to see if it has a valid set of values, in the desired format. 

    3 replies

    gopalk2865
    Participating Frequently
    Feb 10, 2022 10:05 AM UTC

    Hi, i can't tell you exact issue as i cant see whole code here and what values you are passing. But just make sure seleceted value should also exist in choice values array. try to debug the ui and see what's happening once you select anything from the drop down.

    kavyam0002
    Brainy
    Feb 10, 2022 10:16 AM UTC

    a!multipleDropdownField(
                    disabled: if(
                      or(
                        not(
                          fv!item.category_txt = cons!CR_APP_SC_GENERAL_SPECIFIC_LAB_VAL[2]
                        ),
                        rule!CR_APP_FN_freezeRecords(
                          crAppSelectedItem_cdt: fv!item,
                          isDisplayed_bool: ri!isEditable_bool
                        )
                      ),
                      true(),
                      false()
                    ),
                    placeholderLabel: cons!CR_APP_TXT_PLACEHOLDER_VALUE,
                    choiceLabels: trim(
                      split(
                        local!facilityChoices.limitIdDescription_txt,
                        ";"
                      )
                    ),
                    choiceValues: trim(
                      split(
                        local!facilityChoices.limitIdDescription_txt,
                        ";"
                      )
                    ),
                    value: reject(
                      fn!isnull,
                      {
                        trim(
                          split(
                            fv!item.facility_txt,
                            ";"
                          )
                        )
                      }
                    ),
                    saveInto: a!save(
                      fv!item.facility_txt,
                      joinarray(
                        save!value,
                        ";"
                      )
                    ),
                    validations: if(
                      rule!CR_APP_FN_freezeRecords(
                        crAppSelectedItem_cdt: fv!item,
                        isDisplayed_bool: ri!isEditable_bool
                      ),
                      null,
                      rule!CR_FN_setMaximumCharactersValidation(
                        comments_txt: index(
                          fv!item,
                          "facility_txt",
                          {}
                        )
                      )
                    ),
                    required: if(
                      rule!CR_APP_FN_freezeRecords(
                        crAppSelectedItem_cdt: fv!item,
                        isDisplayed_bool: ri!isEditable_bool
                      ),
                      false(),
                      index(
                        fv!item,
                        "category_txt",
                        {}
                      ) = cons!CR_APP_SC_GENERAL_SPECIFIC_LAB_VAL[2]
                    )
                  )

    harshitb6843
    Brainy
    Feb 10, 2022 10:21 AM UTC

    Hi there,

    According to the error, the choiceValues is null. 
    Try printing the choice values on the screen to see if it has a valid set of values, in the desired format.