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

Outputing a data flow from a loop in a java component

I have a problem with some java code. I need to do a search in a java component to a special database which returns me an array of variables.
What I need to do is loop through that array and using java methods output information for each variables like a tFileDelimited would do for each line of text.
Is that possible or do I have to find a work around?
Labels (3)
3 Replies
Anonymous
Not applicable
Author

Hey,
I have a similar situation.
Through an API I retrieve an Array of Objects. What I need to do is iterate through this array, extract some information and AT EACH iteration send that data to the rest of my design.
Hope someone can help.
Thank you in advance.
Anonymous
Not applicable
Author

hi,
here some ideas to "play" with an array and a loop 0683p000009MACn.png
Not sure it's what you're looking for but if it can help you
ps : cast object type (my context variable) to an Array (String[]) type !
It will be easier coding directly in tJava componenet perhaps ....
regards
laurent
Anonymous
Not applicable
Author

Hey,
Thanks for the answer,
I replaced the tJava componenent with a TJavaFlex componenet to send off all my Object data and it seems to work fine.
Is this the only way that this can be done? Storing an Array Objects into a context doesn't seem like an ideal solution.
Thanks