Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vchuprina
Specialist
Specialist

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?

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
1 Solution

Accepted Solutions
Gysbert_Wassenaar

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

View solution in original post

2 Replies
Gysbert_Wassenaar

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
Specialist
Specialist
Author

Thank you, Gysbert!

It's work fine.

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").