Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
thanks in advance ,
I have the next problem with script and reload a qvw from a console.
my script in a .qvw:
Sub GetFiles(vPath)
For each vFile in FileList('$(vPath)\*.*')
ARCHIVOS_Gaviport:
Load
UPPER(RIGHT('$(vFile)', LEN( TRIM('$(vFile)')) - INDEX('$(vFile)', '.', -1))) AS EXTENSION_G ,
RIGHT('$(vFile)', LEN( TRIM('$(vFile)')) - INDEX('$(vFile)', '\', -1)) AS ARCHIVO_CORTO_G ,
'$(vPath)' AS CARPETA_G ,
'$(vFile)' AS ARCHIVO_LARGO_G ,
NUM(FileSize('$(vFile)') / 1024, '#.##0 kB') AS TAMAÑO_G ,
FileTime('$(vFile)') AS FECHA_G
AutoGenerate(1)
;
Next
End Sub
Call GetFiles('\\192.168.10.152\Fotos\Compras\');
when I running it from qlikview desktop works properly , but when I try to running this from qlikview management console I have next console error(attach a word).
In addition I checked folder security and it is ok.
thanks
It looks to me like zero files are being found in the FileList() function when run on the server. Best guess is that the account running the Distribution Service does not have permission to list files in that directory.
-Rob
You will want to look at the document script log to find out what the specific reload error was.
-Rob
Thanks Rob ,
But where can I find it ?
I found this folder C:\ProgramData\QlikTech\DistributionService\1\Log\20190527 and I checked the log and it is the same that attached. I don't know whats appened .
Thanks,
Attached a log.
if Document Log is enabled, in that same folder you should have a file named "DocumentLog.txt". Also in the same folder as the QVW will be a file named same as qvw with ".log" suffix. E.g. for "sales.qvw" will be "sales.qvw.log".
If you don't find the document log in either location, it means it is not enabled for the document. Open the QVW, Settings, Document Properties, General, check "Generate Logfile". You will have to rerun the task at this point to get a logfile.
Every document should have a logfile. It drives me crazy that it's not the default. You can make it your default for future new qvws by updating Settings, User Preferences, Design, "Always use logfile for new documents".
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com
thanks Rob again.
I attached my log , I don't understand what it's happening, because in QVW it work properly and from the management console doesn't work.
my script:
Sub GetFiles(vPath)
For each vFile in FileList('$(vPath)*.*')
ARCHIVOS_Indacor:
Load
UPPER(RIGHT('$(vFile)', LEN( TRIM('$(vFile)')) - INDEX('$(vFile)', '.', -1))) AS EXTENSION ,
RIGHT('$(vFile)', LEN( TRIM('$(vFile)')) - INDEX('$(vFile)', '\', -1)) AS ARCHIVO_CORTO ,
'$(vPath)' AS CARPETA ,
'$(vFile)' AS ARCHIVO_LARGO ,
NUM(FileSize('$(vFile)') / 1024, '#.##0 kB') AS TAMAÑO ,
FileTime('$(vFile)') AS FECHA
AutoGenerate(1) ;
Next
End Sub
Call GetFiles('\\192.168.10.152\Fotos\Compras\dbIndacor\');
thanks
It looks to me like zero files are being found in the FileList() function when run on the server. Best guess is that the account running the Distribution Service does not have permission to list files in that directory.
-Rob