Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
eduardo_dimperio
Specialist II
Specialist II

Help with variables

Hi everyone

im trying to use the string inside a variable as path

but its not working, someone could help me?

Variaveis:

load

  LOCAL

FROM [lib://Athena-Lib\CAS_Enderecos.xlsx]

(ooxml, embedded labels, table is Ultragaz);

NoConcatenate

Find:

LOAD

LOCAL

Resident Variaveis

WHERE LOCAL like '*RS_SYSTEM.qvd*';

Let $vLocal=FieldValue('LOCAL',1);

drop table Variaveis;

CADASTRO:

LOAD

   OID_SYSTEM,

    OID_GROUP,

    NAME_SYSTEM,

    ADDRESS_SYSTEM,

    ADDRESS_NUMBER_SYSTEM,

    SSN_REMOTE_SYSTEM,

    mid(SSN_REMOTE_SYSTEM,5,2) as CODIGO_OPERADORA,

    MIN_REMOTE_SYSTEM,

    NEIGHB_SYSTEM,

    CITY_SYSTEM,

    UF_SYSTEM,

    CEP_SYSTEM,

    STATUS,

    ID_SYSTEM_TYPE

FROM $(vLocal) (qvd);      // value of variable [lib://Ultragaz QVD/RS_SYSTEM.qvd]

1 Solution

Accepted Solutions
sunny_talwar

Why do you have the extra $ sign here?

Let $vLocal=FieldValue('LOCAL',1);

May be remove that

Let vLocal=FieldValue('LOCAL',1);

View solution in original post

4 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Change your script where condition and try.

LOCAL

FROM [lib://Athena-Lib\CAS_Enderecos.xlsx]

(ooxml, embedded labels, table is Ultragaz);

NoConcatenate

Find:

LOAD

LOCAL

Resident Variaveis

WHERE Wildmatch(LOCAL,'*RS_SYSTEM.qvd*');

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
sunny_talwar

Why do you have the extra $ sign here?

Let $vLocal=FieldValue('LOCAL',1);

May be remove that

Let vLocal=FieldValue('LOCAL',1);

eduardo_dimperio
Specialist II
Specialist II
Author

Because im a idiot lol

I thought that to create a variable i needed to use $, thanks it works !

Thank you again Sunny

eduardo_dimperio
Specialist II
Specialist II
Author

Hi Kaushik, thanks for the help, but i always want to understand why my code doesn't work before change it.

The problem was that i used $ when i created the variable.