Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
krishna20
Specialist II
Specialist II

Variable Creating weird Problem

Hi Folks,

My Variable in APP is creating weird issue.

In Variable overview I declared values.

vADMINNTNAME = '001\A','002\B','003\C','004\D';

Dummy:
LOAD CONCAT(CHR(39) & ADMIN_NTNAME & CHR(39),',') AS ADMIN_NTNAME1
RESIDENT ADMINUser;

LET vADMINNTNAME = PEEK('ADMIN_NTNAME1',0);

Test:

LOAD distinct concat(Chr(39)&NTNAME&Chr(39),',') as USER1
Resident Security
Where ACCESS = 'USER'
and wildmatch(upper(NTNAME),$(vADMINNTNAME))=0;

In the above script $(vADMINNTNAME) is creating issue.

I have not changed anything. The same code is using in two different environments.The application is not reloading .  It's working in one environment and not in another environment.

Log file :

Where ACCESS = 'USER'

03/08/2016 19:49:35: 0289 and wildmatch(upper(NTNAME),)=0

03/08/2016 19:49:35: Error: Error in expression:

I tried by using '$(vADMINNTNAME)' also , app is refreshing fine but objects are overlapping to users.

Please anyone can light up on this issue.

Updated log file error :

15 Replies
Mark_Little
Luminary
Luminary

HI,

What is the weird issue?

Do you get an error message?

If you add a trace command after the variable is created what is returned?

I.e. Trace $(vADMINNTNAME);

Mark

sunny_talwar

How about without dollar sign expansion?

and WildMatch(Upper(NTNAME), vADMINNTNAME) = 0;

ThornOfCrowns
Specialist II
Specialist II

Try here for the syntax:

Variables in an Array | Qlik Community

krishna20
Specialist II
Specialist II
Author

Hi

I tried Trace, it's raising error as field not found.

krishna20
Specialist II
Specialist II
Author

Hi Sunny,

Used that and it's raising error as field not found. Please find the log file error in parent thread

Anonymous
Not applicable

only a typo error?

vADMINNTNAME = '001\A','002\B','003\C','004\D';

LOAD CONCAT(CHR(39) & ADMIN_NTNAME & CHR(39),',') AS ADMIN_NTNAME1

where does ADMIN_NTNAME is coming from??

wildmatch(upper(NTNAME),$(vADMINNTNAME))=

your log says

03/08/2016 19:49:35: 0289 and wildmatch(upper(NTNAME),)=0

obviously vADMINNTNAME contains empty string

Mark_Little
Luminary
Luminary

HI,

Field not found would point to an issue with the field probably the NTNAME field and not the variable.

I would check that these are correct and present in the data, the spelt correct and are the same case.

Mark

krishna20
Specialist II
Specialist II
Author

Hi Rudolf,

ADMIN_NTNAME is coming from RESIDENT ADMINUser;

ADMIN_NTNAME it's a field combination of Domain and NTLOGIN

Anil_Babu_Samineni

Might be Here is the Problem,

vADMINNTNAME = "001\A","002\B","003\C","004\D";

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful