Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to modify a load script where we have for each and if-condition.
It goes through all the qvd files. And I don't want it to load qvd files that are not from the year 2015 or 2016 and forward.
So we have
for each file in filelist(folderpath & '\*')
if lower(right('$(v.found.file)',3))='qvd' then
etc
That works
But if I put
for each file in filelist(folderpath & '\*')
if lower(right('$(v.found.file)',3))='qvd'
AND num(lower(left('$(v.found.file)',4))) > num(2014) then
it does not work, it skips the whole thing!
What is wrong and how can I do double if?
Cheers,
Niko
That did the trick! Wow.. What happens in that subfield()-set?
Thank you!
Cheers,
Niko
lets say you have value in vFile as D:\Data\QVD\2015-05.qvd
inner subfield('$(vFile)','\',-1) - picks up 2015-05.qvd and our subfield picks up the 2015 from (2015-05.qvd)
Hi Niko,
It is more easy:
for each vFile in filelist(folderpath & '\*.qvd')
if subfield(subfield('$(vFile)','\',-1),'-',1) >=2015 then
....
end if
next
Kind regards.
Nice! Have to remember this subfield() in the future, seems to be very useful.
Thanks a lot again
Always learning new things here about QlikView.
Cheers,
Niko
Yeah, Qlik community is gr8.
Yes, it surely is!