Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to concatenate two field while reading it from ini

Hi All,

Can some one please help me to me to concatenate two field while reading it from ini.

In the attached document I have managed to read "PS01" from STR=PS01 which is there in the ini. Now what i want is read "2009" from Year=2009 which is there in the ini. Concatenate both and show it as PS012009 in mypath which is there in the document.

I know it is very simple. But not getting any idea how to do this.

1 Solution

Accepted Solutions
Not applicable
Author


MyInifile:
LOAD
MID(@1, INDEX(@1, '=') + 1) AS DataIn
FROM
(txt, codepage is 1252, no labels, delimiter is '\t', msq)
WHERE
LEFT(@1, 4) = 'STR=' OR
LEFT(@1, 5) = 'Year='
;
AsAField:
LOAD FieldValue('DataIn', 1) & FieldValue('DataIn', 2) AS MyPath RESIDENT MyInifile;
AsAVariable:
LET varMyPath = FieldValue('DataIn', 1) & FieldValue('DataIn', 2);


View solution in original post

2 Replies
Not applicable
Author


MyInifile:
LOAD
MID(@1, INDEX(@1, '=') + 1) AS DataIn
FROM
(txt, codepage is 1252, no labels, delimiter is '\t', msq)
WHERE
LEFT(@1, 4) = 'STR=' OR
LEFT(@1, 5) = 'Year='
;
AsAField:
LOAD FieldValue('DataIn', 1) & FieldValue('DataIn', 2) AS MyPath RESIDENT MyInifile;
AsAVariable:
LET varMyPath = FieldValue('DataIn', 1) & FieldValue('DataIn', 2);


Not applicable
Author

Hi Martin,

It was a excellent work. Full credits to you. But I am not able to understand how your script works. I had gone through tutorial also but I am not able understand how it works. Will be thankful to you if you can explain me the script line by line.