Hi @atothep , I have a few components that require a Path variable as part of their configuration.
What I do is this:
Firstly
All possible incoming variables are turned into a table row. In the Component Input config you may choose to give them all a prefix so they won’t conflict with anything else that you write in your component.
Once you have the variables turned into “columns”, you can use a Column Selection Configuration that only accepts Paths:
So what this does is turn the variables into “columns” and so the user can select one of those columns using Column Selection Configuration. Yes, they were originally variables, but now a column. But that doesn’t matter because you just want the value!
You now you have a variable containing the name of your selected “variable” which is currently a column.
And if you then add a “Variable to Table Row”, and use the flow variable tab configured with the input column set to the variable name that you created in the Column Selection Config, you have a column containing the value of the flow variable they passed in. So now it doesn’t matter what the name of the variable is, because you’ve got the value of it as a column, and you can turn it back into a variable using any name you like!
OK, that may be insufficiently clear. So I have here an example workflow that you can look at
It has an Excel Writer creating a Path flow variable called “testpath”
Within the component, going through the steps listed earlier, I have a table row containing the value of the variable that has been passed in via the configuration
Once I have the value, I can put it into any variable I choose and use it subsequently in the rest of my component
In this demo, the Path variable is selected in the config for the component. Have a play around and if you have any questions please ask. (It may be easier to unlink the component so you can modify things and see how they work.)
Demo of receiving path variable in a component.knwf (52.9 KB)
The component in this example is here