Is it possible to share the data of 2 data window into 1 data window? How? And if not, is there any other way to pass the data of 2 datawindow into 1 data window?
Asked
Active
Viewed 813 times
0
-
2what have you tried? Always post an example of code, and how it fails. See https://stackoverflow.com/help/how-to-ask – Davide Alberani Aug 15 '17 at 11:30
-
No- you cannot share two datawindow (source) into one. Passing data between datawindows can be done many ways, using GetItemXXX and SetItem function, dot notation, data. An example of what you want to share might help but people will be reluctant to help if you're asking them to do your work. – Rich Bianco Aug 15 '17 at 23:05
-
I'm not asking to do my work. What I am asking is just an explanation, that's the reason why I didn't post a code because what I need is an explanation Sir Rich Bianco. Anyway, thanks for answering. – m-a Aug 16 '17 at 00:37
-
Davide Alberani is one of those stackoverflow trolls that have no idea what the answer is yet feel compelled to point out issues in how you worded the question. You should use the Appeon forum instead. At least he didn't say you were off topic. – Roland Smith Aug 22 '17 at 12:30
2 Answers
0
In short, no. Sharedata works only from a single source. If multiple source datawindows have the same column types you can use the Rowscopy method and copy many sources into a single destination datawindow.

Matt Balent
- 2,337
- 2
- 20
- 23
-
Thanks for explaining Sir Matt. I have a question, in using rowscopy, Does it need that the length of data type of the datawindow(where you are going to store the copied rows) be the same to all data windows(where the rows are from)? – m-a Aug 17 '17 at 05:03
-
0
An alternative method is to go back to the 'SELECT' statement ans work with SQL UNION. For example, fi you have the following SQL statements for your 2 dw:
SELECT a,b,c from table1
SELECT d,e,f from table2
you could create a new datawindow using the following SQL
SELECT a,b,c from table1
UNION
SELECT d,e,f from table2
Of course, the various columns must be of the same type, one by one (a must be equivalent to d, b to e,...).
Alternatively, instead of creating a new dw, you could modify the SQL from dw1, adding (UNION) the SQL of dw2 and retrieving data.
just let me know if you need further details.

Marc Vanhoomissen
- 395
- 2
- 12