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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

globalMap returns null at tAdvancedFileOutputXml file name

Hello everyone.

I have an issue in TOS 5.4.

I need to create xml file according to field gathered from another xml. And I need to have dynamic file name of output file. But globalMap.get returns null in file name field.

I have checked that I have such value in globalMap by tJava element.

Please see screenshots.

 

0683p000009Lxxn.png

0683p000009Lxxo.png0683p000009Lxxp.png

Code in tJava_1

System.out.println("/Outbound/tokenRequestTemp/" +((String)globalMap.get("requestId"))+ ".xml");

I'm really stuck with that. Because I was using globalMap like this in another Output components and it was working fine.


Thanks in advance.

 

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Ok, got it. Its time problem as Francois Denis said.
I have managed it through tRowGenerator

 

0683p000009LyCs.png

 

Thank you Francois Denis.

View solution in original post

6 Replies
manodwhb
Champion II
Champion II

@NikitaMikh,how are you putting global map value for 

requestId?
Anonymous
Not applicable
Author

Hello Manohar.

Yes in tJavaRow_1

globalMap.put("requestId", requestId);

And value is not null. I'm checking it in tJava_1 and output is correct.

fdenis
Master
Master

requestId is a field?
so it row1.requestId
Anonymous
Not applicable
Author

This is how I'm put requestId in globalMap in tJavaRow_1

String requestId = (String)globalMap.get("tWaitForFile_1_FILENAME");
requestId = requestId.substring(0, requestId.length() - 4);
requestId = requestId.replace(" ", "_");
globalMap.put("requestId", requestId);

No matter what I'm writing in file name: globalMap.get("requestId") or tokenRequest.requestId - output file name is still null.

fdenis
Master
Master

ok sorry it's time problem.
xml file is open in write mode before calculation of the gblbalMap value.

Solution is:
tWaitForFile - iterate- tjava to set globalMap - onSubjobOk -
tFileInputXml…….
Anonymous
Not applicable
Author

Ok, got it. Its time problem as Francois Denis said.
I have managed it through tRowGenerator

 

0683p000009LyCs.png

 

Thank you Francois Denis.