Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

techvarun
Valued Contributor II

Dynamic Data Source

Hello Experts

   I ahave a table with two coloumns

Val and Pub

if my values are

Val            pub

1212121    1212121

I need to load the data from Data_7.txt

if in case my values

Val            pub

1212121   

I need to load the data from Data_0.txt

Usulally the Data_$(len).txt have to cotain the lenghth of the field PUB

My table will have always only one entry

Please suggest a way to achieve this

1 Solution

Accepted Solutions

Re: Dynamic Data Source

Something like this:

LOAD pub FROM ValPubSourceTable;

LET vLen = len(trim(peek('pub')));

LOAD * FROM Data_$(vLen).txt (txt, ....);


talk is cheap, supply exceeds demand
1 Reply

Re: Dynamic Data Source

Something like this:

LOAD pub FROM ValPubSourceTable;

LET vLen = len(trim(peek('pub')));

LOAD * FROM Data_$(vLen).txt (txt, ....);


talk is cheap, supply exceeds demand
Community Browser