Hi
I am trying to create an auto flow variable for another set of nodes. I have attached the parts that I am concerned with. If I have a table
and I want to create flow variable like ‘A’,‘B’,‘C’,‘D’ What is the best way to proceed?
In this example the table contains 4 Rows of string. How do go about If the next time the table contains only 2 rows or the 10 Rows of string. How do I fool proof this automation?
I would solve this by using a Java Snippet. That’s how you keep it simple.
First of all however, you should initialize a workflow variable - in my example it’s called “var” and you can define it by right clicking the workflow name in the explorer…
why do you want to build such flow variables? Can you share what is the use case behind this?
Additionally you can use String Manipulation to add single quotes around in string column. Then group whole table with GroupBy node and use concatenate method to have values separated by comma. Finally use Table Row to Variable. Should work regardless of row count.
Hi @ ipazin
Thanks for your help. It is also a nice solution.
I get a csv file sent to me everyday which shows the parts that have issues but I have to filter part of it. I have to rename it and had manually input a local flow variable as show in the screen shot which I then run using a sql.
I was looking to automate from the csv file. So instead of manually inputting the flow variable to the sql query, how can I from the csv file automate it. Your help as well as @Tommy flow helped me solve this. I have provided you the screen shot of the workflow. As it is related to my work I wans’t sure If could post the workflow as it. I hope that this answers your question.