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
try this
for each vFile in filelist(folderpath & '\*')
if lower(right('$(vFile)',3))='qvd' and subfield(subfield('$(vFile)','\',-1),'-',1) >=2015 then
...
end if
Try,
AND left('$(v.found.file)',4 )> 2014 then
Hi Niko,
There is syntax error. Opening brackets count and close brackets counts are not matched.
num(lower(left('$(v.found.file)',4))) > num(2014)
try this.
-Joyson G
Nope, it did not work either.. Still skipping the script phase.
'$(v.found.file)' instead '$v.found.file)'
Yeah, there was a typo.. But it isn't still working
what is Filename?
They are all like
2013-06.QVD
2013-07.QVD
.
.
.
and so on
try this
for each vFile in filelist(folderpath & '\*')
if lower(right('$(vFile)',3))='qvd' and subfield(subfield('$(vFile)','\',-1),'-',1) >=2015 then
...
end if
I am not sure why this is not working for you. I did a test and it's working.