Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
sashe001
New Contributor

Field 'a' not found

Hi,

I'm getting the following error in my Qlik load

Qlik error.PNG

I've searched through the script and there's no 'a' leftover anywhere. Error appears to be happening in the Master Cal script. I've attached the script below.

Anyone any ideas how to resolve it?

Thanks,

Sarah

7 Replies
Chanty4u
Esteemed Contributor III

Re: Field 'a' not found

Hi

did you debug the script line by line?

check where exactly it is stopping?

even if you dont found.  

each and every table put exit script and reload each table then you come to know where exactly you are wrong

jwjackso
Valued Contributor

Re: Field 'a' not found

Follow Chanty's suggestion and verify the actual values stored in varMinDate and varMaxDate

Re: Field 'a' not found

Before anyone can tell you how to resolve "it", we need to know what is causing this problem.

Put an

Exit Script;

right after the let varMaxDate = Peek(...); statement. Reload your document and check the content of varMinDate and varMaxDate in the Settings->Variable Overview dialog. Do they contain numerical values?

sashe001
New Contributor

Re: Field 'a' not found

The error is occuring here:

TMP_Calendar:

load

$(varMinDate) + Iterno()-1 as Num, 

Date($(varMinDate) + IterNo() - 1) as TempDate 

AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate); 


Set vFM = 4 ;                                                          // First month of fiscal year


I'm using Microsoft Visual Studio so myself and a colleague can co-develop. When he reloads he doesn't get any errors and has the exact same script that I have!

Chanty4u
Esteemed Contributor III

Re: Field 'a' not found

Basically this error will occur with the resident table  not referring the exact table

kindly check the  all resident table used in your script.

Margaret
Contributor II

Re: Field 'a' not found

I am getting the same error with a very similar script:

TempCalendar:
LOAD
$(varMinDate) + Iterno()-1 As Num,
Date($(varMinDate) + IterNo() - 1) as TempDate
AutoGenerate '1' While $(varMinDate) + IterNo()-1 <= $(varMaxDate)
;

I don't understand what should be checked about resident tables. This load statement isn't loading from a table. Its just loading from variables. I tried putting a comma after TempDate and it doesn't like it. I tried putting 'Resident [existing table name]' before the semicolon ; and it didn't like that either.

Partner
Partner

Re: Field 'a' not found

Martin_Ma, I have the same script as you. My error comes from varMinDate and varMaxDate being NULL. I checked the variables using debug mode  and putting a breakpoint at TempCalendar. 

Make sure that the variables are being filled.

 

QuartersMap:
MAPPING LOAD
rowno() as Month,
'Q' & Ceil (rowno()/3) as Quarter
AUTOGENERATE (12);

Temp:
Load
Min([Datum aangemaakt]) as minDate,
Date(Floor(Max([Datum aangemaakt]))) as maxDate
Resident Incident;

Let varMinDate = Date(Num(Peek('minDate', 0, 'Temp')));
Let varMaxDate = Date(Num(Peek('maxDate', 0, 'Temp')));
DROP Table Temp;

TempCalendar:
LOAD
$(varMinDate) + Iterno()-1 As Num,
$(varMinDate) + IterNo() - 1 as TempDate
AutoGenerate 1 While $(varMinDate) + IterNo() - 1 <= $(varMaxDate);// + 7;