Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

vchuprina
New Contributor II

How write data from a column in the variable?

I have some data in column F2 and I want to write this value into variable.

After this I plan use this variable in "if ...else" operator.

Please see part of my script:

LOAD F2 AS Department

FROM

[$(vFile)]

(biff, embedded labels, header is 2 lines, table is [Sheet1$]);

T1:

NoConcatenate

LOAD Department Resident Temp;

DROP Table Temp;

LET vDep = WildMatch (Department, '1803007','2600831','2900637');

If I'm not mistake, first I need load data from F2 and then use:

WildMatch (Department, '1803007','2600831','2900637');

But this function doesn't return value.

For example, if in file I have '1803007' in F2 column, so WildMatch should return '1'.

How load write from F2 into variable?

1 Solution

Accepted Solutions

Re: How write data from a column in the variable?

Try this:

LOAD F2 AS Department

FROM

[$(vFile)]

(biff, embedded labels, header is 2 lines, table is [Sheet1$]);

 

T1:

NoConcatenate

LOAD concat(Department,'|') as DepList Resident Temp;

DROP Table Temp;

 

LET vDep = Match (peek('DepList'), '1803007','2600831','2900637');


talk is cheap, supply exceeds demand
2 Replies

Re: How write data from a column in the variable?

Try this:

LOAD F2 AS Department

FROM

[$(vFile)]

(biff, embedded labels, header is 2 lines, table is [Sheet1$]);

 

T1:

NoConcatenate

LOAD concat(Department,'|') as DepList Resident Temp;

DROP Table Temp;

 

LET vDep = Match (peek('DepList'), '1803007','2600831','2900637');


talk is cheap, supply exceeds demand
vchuprina
New Contributor II

Re: How write data from a column in the variable?

Thank you, Gysbert!

It's work fine.

Community Browser