2 Replies Latest reply: Jul 21, 2011 1:03 PM by gsmetana RSS

    "File not found" error when calling a variable in a LOAD statement

      Hi,

       

      I'm new to QlikView and have one basic question: Why the code below (script edit) doesn't work?

       

      LET loggedUser=OSUser();

       

      tbPermissions:

      LOAD a,

           b,

           c,

           d,

           e,

           f,

           g

      FROM

      C:\Projects\QlikView\Permissions.xls

      (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.