Skip to main content
hema.mathivathanan
Employee
Jul 25, 2023 1:28 PM UTC
Question

Concat in Dropdown

Hi, 

In my dropdown field, I need the choice Labels to be concatenate two fields.

choiceLabels: concat ( fieldname1 & "-" &  fieldname2 ). When I Used this, I am getting below errror:

A dropdown component has an invalid value for "choiceValues". The choiceLabels and choiceValues arrays must be the same length, but choiceLabels was length 1 and choiceValues was length 101.

    2 replies

    gabriele.camilli
    Employee
    Jul 25, 2023 2:20 PM UTC

    Hi

    I think that the problem is that you are concat all the values together and not using an a!forEach to have one label per choice value

    Can you share your code?

    hema.mathivathanan
    Employee
    Jul 25, 2023 2:32 PM UTC

    thanks for your reply, I created the custom record field to concat and it worked.