ACD101 practice question 8 of 15

You receive the following error message after creating a dropdown field: What could be the problem?

Full set: 59 questions
Answer options
A: The choiceLabels and choiceValues datatypes do not match.
B: The choiceValues has too few values. Correct answer
C: The choiceLabels have too few labels.
Correct Answer:
B. The choiceValues has too few values.
Explanation

The error message explicitly states, "The choiceLabels and choiceValues arrays must be the same length. choiceLabels has length 3 and choiceValues has length 2." This indicates a mismatch in the number of items between the two required parameters for the dropdown component. The choiceValues array, with a length of 2, has fewer items than the choiceLabels array, which has a length of 3. For the dropdown to function correctly, there must be a direct one-to-one correspondence between the displayed labels and their underlying values.

Why Incorrect

A. The error message is about the length of the arrays, not the data types of the elements within them. A data type mismatch would result in a different error.
C. The error message clearly shows that choiceLabels has a length of 3, which is more than the choiceValues length of 2, not fewer.

References

1. Appian Documentation, Dropdown Component: In the documentation for the a!dropdownField() SAIL component, under the configuration options for choiceLabels and choiceValues, it is specified that these two parameters must be lists of the same length. The system enforces this requirement to ensure a valid mapping between what the user sees and the data that is saved.

Source: Appian Product Documentation, "SAIL Components," section "Dropdown." Specifically, review the parameter descriptions for choiceLabels and choiceValues.

Scroll to Top