Discussion board where members can get started with QlikView.
I'm new to QlikView and have one basic question: Why the code below (script edit) doesn't work?
(biff, embedded labels, table is Plan1$);
LOAD TextCount(a) as test Resident tbPermissions Where a = $(loggedUser);
I get the following error when the script is reloaded:
Field not found - <MYDOMAIN\myuser>
LOAD TextCount(PRINCIPAIS_NUMEROS) as visualizaPrincipaisNumeros Resident tbPermissoes Where PRINCIPAIS_NUMEROS = MYDOMAIN\myuser
It seems the that the user name is not interpreted as a String. The code below works, but I really need to use the variable "loggedUser":
LOAD TextCount(a) as test Resident tbPermissions Where a = OSUser();
I am using QlikView Personal Edition for Windows, version 10.00.9061.7 SR3.
Go to Solution.
you are missing single quotes Where PRINCIPAIS_NUMEROS = 'MYDOMAIN\myuser'
May be I wasn't clear enough, but the text in red is the error message, not the script. Anyway, I tried to sorround "$(loggedUser)" with single quotes and it worked...
LOAD TextCount(a) as test Resident tbPermissions Where a = '$(loggedUser)';
I thought that anything inside single quotes would be interpreted as a string, I didn't realyze it would process "$(loggedUser)" first and evaluate the entire result with single quotes after.
God bless you! Regards,