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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Assign file name for tFileOutputDelimited

I would like to use a variable as filename in the "File Name" box of the tFileOutputDelimited. The variable Filename as been defined and a value was assigned in a previous tMap. I tried to use it in the "File Name" box with the syntax : tMapRow.filename. Unfortunetly I have got Exception error (see below). If I use the same variable with a tMsgBox component it works. If I use the file selection to specify a filename it works. Is it possible to specify the filename using variables ?
Thanks for your help,
Michel
Exception in component tFileOutputDelimited_1
java.lang.NullPointerException
at java.io.File.<init>(Unknown Source)
at majtoponymicinfo.majtoponymie_0_1.MajToponymie.tPostgresqlInput_1Process(MajToponymie.java:1139)
at majtoponymicinfo.majtoponymie_0_1.MajToponymie.runJobInTOS(MajToponymie.java:1812)
at majtoponymicinfo.majtoponymie_0_1.MajToponymie.main(MajToponymie.java:1720)
Labels (3)
2 Replies
Anonymous
Not applicable
Author

Hi,
this sounds like a timing problem. The file is created before the flow starts. So you need to use a tFlowToIterate (if you need different files depending on your data) or you need a context variable (which could be set on startup). For more information it would be good to have a screen shot of your job.
Bye
Volker
Anonymous
Not applicable
Author

Hi Volker,
You put me on a good track. I splitted my flow. I created a global variable (tSetGlobalVar) using my row attributes. Then I used the global variable in my tFileOutputDelimited in a different flow triggered by the On Component OK. The results are just fine !
Thanks,
Michel