You need to sign in to do that
Don't have an account?
Sanjana Rajasekar 9
Flow to LWC
I am trying to pass Record Collection Variable from Flow to LWC. But in the flow, not able to pass the collection variable as input to lwc. I can see the values in the screen . Can someone help me to understand what I am missing here?
Collection Variable Values are : [01u0P00000, 01u0P00000,01u0P00000kj]
Collection Variable Values are : [01u0P00000, 01u0P00000,01u0P00000kj]
<targetConfigs> <targetConfig targets="lightning__FlowScreen"> <property name="selected_products" label="Selected Products" type="String[]"/> </targetConfig> </targetConfigs>
Can you share the screenshot of how you are adding the values into this variable and is the variable accepting mutiple values of type text?
Thanks,
The Record Collection variable is of type Record.
I am using a data table component in a screen where It list the products. The selected products are storing it in collection variable.
When I print the collection variable, I am getting the IDs of the selected products.
I don't guess it will work because you are defining in lwc as type="String[]" so it only accepts record collection of type string. Can you create that variable and add those ids to the variable and assign it.
Thanks,
In the LWC you have defined the selected_products variable as String[], But you are passing RECORD[] from the flow. You have to create a variable of type String which accepts multiple variables and add the recordids to that variable.
I hope you got the issue now.
Thanks,
Are you able to get how to add the record ids to the collection variable?
Thanks.