Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Copy input row to output row with tJavaRow

Hey all,
when I do this : output_row = input_row; (much like in perl doing @output_row = @input_row);
I get this error: Type mismatch: cannot convert from load_my_draw.row1Struct to load_my_draw.row2Struct
Is there a way to copy teh complete row from input row to output row?
Ries
Labels (2)
4 Replies
Anonymous
Not applicable
Author

Hello
It is not available in Java now. Can you report a new feature on our bugtracker? In Java, you have to work filed by filed like:
(for example)
output_row.id = input_row.id;

Best regards
shong
Anonymous
Not applicable
Author

there is a readData and writeData on each row so perhaps it's possible to do write a java routine to do something like this
in the tJavaRow
// write data
ByteArrayOutputStream myBytes = new ByteArrayOutputStream();
ObjectOutputStream dos = new ObjectOutputStream(myBytes);
input_row.writeData(dos);

// read data
ByteArrayInputStream myReadBytes =new ByteArrayInputStream(myBytes.toByteArray());
ObjectInputStream dis = new ObjectInputStream(myReadBytes);
output_row.readData(dis);

but i didn't manage to debug it !
Anonymous
Not applicable
Author

Hi,
How does it work now? Can we make a complete copy by using output_row=input_row? I try this but it seems I have a conversion problem.
Anonymous
Not applicable
Author

Hi,
How does it work now? Can we make a complete copy by using output_row=input_row? I try this but it seems I have a conversion problem.

Same question here. Any hints?