Forum Discussion
Generate new Queries from Function
This is entirely a theoretical question at the moment, and perhaps it will solve itself as I continue development. Mostly interested to see what people have to say or what their thoughts are.
At present I have two queries (highlighted in yellow) that I built 'manually'. I was then able to write a function (red) that is capable of generating both Yellow Queries based on inputing different arguements. The data to generate the result (Green/boxed red) comes from two other queries (Purple/Teal).
I know that if I had a table with the neccessary arguement values as columns I could call the function as 'Add Column' and it would generate a column that contains Table(s) as the result of the function call per row. So a result like this:
| ID | Arguement1 | Arguement2 | etc. | NewColumn(function result) |
| 1 | value1 | value2 | <> | Table |
| 2 | valueA | valueB | <> | Table |
The question then, is there a way to dynamically through PQ to break the Table Results in the new column out as unique, seperate queries, which could then be loaded as seperate Tables? Like my original Queries highlighted in Yellow?