Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
eduardo_dimperi
Valued Contributor 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

Re: Help with variables

Why do you have the extra $ sign here?

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

May be remove that

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

4 Replies

Re: Help with variables

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

Re: Help with variables

Why do you have the extra $ sign here?

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

May be remove that

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

eduardo_dimperi
Valued Contributor II

Re: Help with variables

Because im a idiot lol

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

Thank you again Sunny

eduardo_dimperi
Valued Contributor II

Re: Help with variables

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.