Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a variable called zDates='2016_07'. I need to check whether QVD's with the date already exists in appropriate location or not.
Name of the QVD will be as below.
Employee_M.2016_05.qvd
Employee_M.2016_06.qvd
In this case since 2016_07 qvd does not exists in the file system I need to add that date to the variable. So the variable now should have zDates='2016_07','2016_06'.
If the value in the variable is zDates='2016_06' then there wont be any changes in the varaible it will remain same. That is zDates='2016_06'
If the file system contains below qvd's and the variable zDates='2016_01' then in that case the variable should be updated to zDates='2015_12',2016_01'
Employee_M.2016_11.qvd
Employee_M.2016_12.qvd
Can someone help me to achieve this?
Cool, hopefully you can just tweak that code until it works!
Yes I am trying to do that. But I am getting the below error not sure why.
Script line error:
let zSecondLoadDates = if(replace('''2016_07'',''2016_09''','_','') = 201607,left('''2016_07'',''2016_09''',4)&'_'&right('''2016_07'',''2016_09''',2),
left(201607,4)&'_'&right(201607,2))
I think value in the variable is something like below
zSecondLoadDates='2016_07'
Any idea how this can be handled?
Hmmm so the variable includes the ' already?
if so then take that out of the replace statement so
if(replace('$(zDates)','_','')
becomes
if(replace($(zDates),'_','')
It looks like you just have too many ' going on!
The variable already contains value like below
zSecondLoadDates='2016_07'
If the new date has to be added then it should be something like below
zSecondLoadDates='2016_07','2016_06'
Not sure how this can be handled
it tried doing this but it didn't work.
Yes too many thing going on. Not been able to focus
Sorry I think I had two values in zSecondLoadDates='2016_07','2016_09' so it was getting failed.
ahhhh yes I can see that now in your error, sorry I am not awake yet!
Sorry this didn't work either
Sorry to disturb you. Please check if you can help on this as it is very urgent.
what error do you get now you only have one item in the variable?