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

Number in header

Hi

 

As many other people I am stugglin with a file that need to have a one digit number in column 1 row 1

 

      2

  name1 :  name 2  : name 3

 

Number 2 tells the program which this file is going to be imported to which place this data should be saved on. 

 

Is there a way to solve this in any way?

I was thinking of adding another tfileinputdelimited with just the number 2 in it, is this possible?

Labels (3)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Try this in your tMap (not tested):

0683p000009M6cm.png

Then reuse Var.var2 to populate your output field.

View solution in original post

5 Replies
TRF
Champion II
Champion II

You need to access the file twice:

- 1rst time with no header and limit set to 1 to get just the 1rst record and save its value somewhere (a global variable for example).

- 2nd time with header set to 1 to get the file content except the header line and then you go with the rest of the job

Anonymous
Not applicable
Author

Many thanks TRF for fast reply, will test and revert back

Anonymous
Not applicable
Author

Came up with this solution in my tFileOutput which adds the number I want, the drawback is that it adds it on every row.

 

What should I write in the Var expression field to make it stop after first row? Please find attached files 

 

"2\n" + row1.ISIN


scrnsht2.PNG
scrnsht1.PNG
TRF
Champion II
Champion II

Try this in your tMap (not tested):

0683p000009M6cm.png

Then reuse Var.var2 to populate your output field.

Anonymous
Not applicable
Author

Problem solved! Many thanks TRF, some minor adjustments made and the thing worked!0683p000009M6bn.png


scrnsht3.PNG