Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Reading the path from ini

Hi all,

I have following things in ini. Let me know how can I read the Path which is there in ini and insert in to qlikview loadscript. This is very urgent requirement. Hope some one can help me out soon.

[DBENG]
Start=1
Memory=300
TCPIP=1

HIDE=0
Path=D:\PA42009\10012009

[UpDn]
secondStock Rar=120
second=120


16 Replies
Not applicable

Reading the path from ini


LOAD mid(@1,6) as mypath
FROM

(txt, codepage is 1252, no labels, delimiter is '\t', msq)
WHERE left(@1,5) = 'Path=';


P.S. you need a slash to close the code section /code in square brackets []



Not applicable

Reading the path from ini

Hi J M J G S,

Thanks for your help. I need to check whether it works or not. But in the mean time can you please explain how it works. As the source which I have posted is just the sample. So I need to check how it works in the original ini.

Thanks in advance,

Not applicable

Reading the path from ini

<blockquote><pre>
mid(@1,6) // What is the use of @ here. It is not given in the tutorial

left(@1,5) = 'Path='; //What is the use of @ here. Also let me know what will be assigned in the 'Path='



Not applicable

Reading the path from ini

@1 contains the complete text line read from the file.

If you use the table files load wizard and point to an .ini file to read you will see this in the generated code.

Not applicable

Reading the path from ini


Juerg Maier JmiD GmbH Schweiz wrote:<blockquote><pre>LOAD mid(@1,6) as mypath
FROM

(txt, codepage is 1252, no labels, delimiter is '\t', msq)
WHERE left(@1,5) = 'Path=';

P.S. you need a slash to close the code section /code in square brackets []

Same thing I have tried in my sample application which is attached to it but it is not showing any values. Please check!

Not applicable

Reading the path from ini

Hi J M J G S,

I am looking forward for your reply. Please help me out

Not applicable

Reading the path from ini

You need to post me your .ini file too to see what's going wrong

Edit: It works on my machine with the text you had posted above copied to a file

disqr_rm
Valued Contributor III

Reading the path from ini

Try this:


LOAD
subfield(@1, '=', 1) as Variable,
subfield(@1, '=', 2) as Value
FROM D:\BI\QlikView\Examples\ini-file.ini (txt, codepage is 1252, no labels, delimiter is '\t', msq)
WHERE wildmatch(@1, '*=*') > 0;


Reading the path from ini

Here's an example of reading the value, inserting in a variable and using the variabe in a subsequent LOAD.

LOAD @2 as Path
FROM readinii.ini
(txt, codepage is 1252, no labels, delimiter is '=', msq)
WHERE @1 = 'Path'
;
LET vPath = peek('Path');

LOAD *
FROM $(vPath)\myfile.txt
;

-Rob

Community Browser