All selected values must be present in the choiceValues array

While calling a interface in another interface, I encountered the error message "All selected values must be present in the choiceValues array". I used same constant in both choice label and choice values i.e. cons!

Below are the supporting documents. Kindly help

      

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    It sounds like you're encountering a mismatch between the selected value and the choiceValues in your dropdown or radio button field. Here's how to resolve it:

    1. Create a New Constant for IDs:

      • If your employee type is stored as an ID (integer), create a separate constant for these ID values (e.g., 1, 2, 3, 4).
      • Use this new constant in the choiceValues field while keeping your existing constant for the choiceLabels.
    2. Use dropdownFieldByIndex() (if IDs are sequential):

      • If the IDs are in order, you can use dropdownFieldByIndex() to simplify the dropdown setup.
    3. Ideal Long-Term Solution:

      • Store your employee types in a database table with columns for IDs, names, and an isActive flag.
      • Use QueryEntity to fetch the choiceLabels and choiceValues dynamically. This approach allows easier updates and potential admin management.

    This should resolve the error and provide a more flexible solution for future change

Reply
  • 0
    Certified Lead Developer

    It sounds like you're encountering a mismatch between the selected value and the choiceValues in your dropdown or radio button field. Here's how to resolve it:

    1. Create a New Constant for IDs:

      • If your employee type is stored as an ID (integer), create a separate constant for these ID values (e.g., 1, 2, 3, 4).
      • Use this new constant in the choiceValues field while keeping your existing constant for the choiceLabels.
    2. Use dropdownFieldByIndex() (if IDs are sequential):

      • If the IDs are in order, you can use dropdownFieldByIndex() to simplify the dropdown setup.
    3. Ideal Long-Term Solution:

      • Store your employee types in a database table with columns for IDs, names, and an isActive flag.
      • Use QueryEntity to fetch the choiceLabels and choiceValues dynamically. This approach allows easier updates and potential admin management.

    This should resolve the error and provide a more flexible solution for future change

Children
No Data