Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
chahanswaraj
New Contributor

Field '&F42119_PK' not found

Hi Team,

 

I was getting a error after Migrating to newer version it is creating & file when i compare with old version script both are same .

 

some thing is causing here and creating & file for each table 


for each vFile in FileList('$(vQVD)*.qvd')
let vFileName = mid(vFile, index(vFile, '\', -1) + 1, 99);
let vFileNameOnly = subfield(vFile,'\',-1) ;
let vFilePK = replace(vFileNameOnly,'.QVD','_PK');
let vFilenoQVD = replace(vFileNameOnly,'.QVD','');
let vIncFile = '$(vQVD)'&'$(vFileName)';
let vRawFile = '$(vQVDRaw)'&'$(vFileName)';


//if '$(vFileName)' = 'F0911.QVD' then
[$(vFilenoQVD)]:
load distinct *
from $(vIncFile)(qvd);
Concatenate
load distinct *
from $(vRawFile)(qvd)
where not exists ([$(vFilePK)]);

store '$(vFilenoQVD)' into '$(vRawFile)';

drop table [$(vFilenoQVD)];

 

Please suggest me

5 Replies
Partner
Partner

Re: Field '&F42119_PK' not found

I'm pretty sure it it's your exist() that is throwing you the error. Please check the vFilePK variable.
Please ekskuse my Norglish and Swenglish typos.
chahanswaraj
New Contributor

Re: Field '&F42119_PK' not found

Vegar,

Thanks for coming back to me, You want me to put () next to VFilePK, Please Suggest

Partner
Partner

Re: Field '&F42119_PK' not found

I guess that your VFilePK got the value &F42119_PK and the file you are trying to read does not have a field named &F42119_PK
Please ekskuse my Norglish and Swenglish typos.
chahanswaraj
New Contributor

Re: Field '&F42119_PK' not found

we have recently migrated to new server and causing the error, it may be some syntax error we are suspecting.

and it is creating &F42119 file as a temp file some thing is fishy here. and saying file not found we have another file with name F42119 it suppose to pick that as per script it is working in older version
Partner
Partner

Re: Field '&F42119_PK' not found

If you know how many characters that is in your file name you could swap the star with questionmarks.

for each vFile in FileList('$(vQVD)??????.qvd') //assuming the old * is 6 chars long

This will exclude files with 7 chars such as '&F42119'. 

Please ekskuse my Norglish and Swenglish typos.