3

Background

We've built-in a number of properties for a LWC, and have allowed it to be visible in Lightning Record Pages (lightning__RecordPage) and Flow Screens (lightning__FlowScreen).

The properties are of multiple types - string, boolean, string array (picklist).

Problem

We've noticed two issues when trying to configure the LWC's properties in Flow Builder:

  1. The order of the properties is incorrect.
  2. All properties appear as text inputs (even though some are supposed to be boolean or string array).

Conversely, neither of these issues occur when configuring the LWC in the Lightning App Builder (so when it is being placed on a Lightning Record Page).

Question

Why do these issues occur in the Flow Builder, and is there a way to resolve them?

1 Answer 1

1

I believe it is the currently default behavior.

1) For the flow Screen (lightning_FlowScreen) properties, they are displayed i) required properties first, and then optional properties, and ii) within each group, then, in the alphabetical order by their Label attribute. They are definitely not displayed in the same order as you entered in your LWC js-meta file.

If I need to really enforce an order to how the properties are displayed, I follow a scheme something along the lines of this: "_ Property Label 5", "- .Property Label 3", "- Property Label 1". It is not the prettiest... but it works, shows in this order.

2) All properties seem text, but actually they are not. For the Boolean typed inputs it will accept {!GlobalConstant.True} or {!GlobalConstant.False} as input, while for text inputs you can enter any text directly or use a String variable defined within the Flow.

As for String Arrays (String[]), you will need to pass a flow variable resource that was defined as a a String Collection Variable.

I hope this helps.

3
  • Thanks, what makes you say the properties are displayed in alphabetical order? They're certainly not in my org. I haven't been able to figure out what order they're in. Regarding point #2, you are correct.
    – M H
    Commented Jan 14, 2020 at 21:48
  • I guess for my use cases they were... I have a handful of flow lwc components with around 10 properties each, and all of them get displayed in the alphabetical order by their Label, not their name.
    – kivanconer
    Commented Jan 15, 2020 at 22:56
  • I was working on yet another LWC screen flow component, and I am pretty convinced the properties are displayed in the alphabetical order by their Label attribute. I am updating the original answer.
    – kivanconer
    Commented May 7, 2020 at 5:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .