Combine two Named Queries in one Table

Hello all!

I do have 2 named queryes with the same column "Name" how I can combine both in one table with perspective tables?

Hi Alejandro,

I would start by taking the results of your named queries and putting them as custom properties on the component you are using. Then you can do some scripting to take these two properties in dataset form and combine them. Create an empty list and loop through each of the datasets appending to the empty list.

Once you have all the data in the new list then convert it to a new dataset and assign that to the table data.
The docs I linked are a good start and you should be able to extrapolate from their script example.

1 Like

Thanks Ryan for your explanation. Will look for a solution with your guidelines.

Why not have only one query with a UNION, if required?

2 Likes

Ok, thanks Transistor, that would be more straightforward, just working refactoring an older project with a lot of quick fixes.

Make sure that both queries return the same number of columns and that they're the same datatypes in the corresponding columns.

1 Like