What is the use case
In a database query, we may need to pass a list of IDs into the in (‘xxx’,‘xxx’,‘xxx’) expression.
And the list is usually sourced from a data table, either from an Excel file or extracted from a website.
So, it’ll really be helpful if we can conveniently convert a table column into this format: ‘xxx’,‘xxx’,‘xxx’
How do you see a solution for the use case?
I create a re-usable workflow which can easily apply to such cases.
- datatable - the source datatable
- i - the index of the table column, starting from 0.
- startwith - fill in this if you want to add something like a single quote before each ID
- endwith - fill in this if you want to add something like a single quote after each ID
- separator - the separator between each ID, such as a comma.
Output is the concatenated string.
- Reusable Component
ColumnToString.xaml (11.4 KB)