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

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    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.

  • 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]
                    )
                  )

Reply
  • 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]
                    )
                  )

Children