Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

james
Contributor III

Reduced Document Name saving as today-1?

All, is there a way in 9.0 to save the reduced document name to today -1?

You can use %dd%, which gives you the 15th, however the data is one day old and I was tryng to create it to say the 14th, using %dd-1%, but no luck..

Any ideas

1 Solution

Accepted Solutions
vgutkovsky
Honored Contributor II

Reduced Document Name saving as today-1?

I dug around a little more on this. I think that %ScriptParameter% does not mean a variable in the script in the sense that we mean, but is instead tied to the Parameter Name / Parameter Value on the reload tab and is used like a Repeat task in 8.5. So scratch that.

Unless there is some hidden way to insert formulas directly in the naming convention (and I don't think there is), you might need to create a separate field instead of a variable. This field would have a value of day(today()-1) for each instance of the field on which you are reducing. Then the naming convention could use %DocumentField,fieldname%. It's a little annoying to have to do it like this, but I don't know of any other way.

Good luck,

10 Replies
vgutkovsky
Honored Contributor II

Reduced Document Name saving as today-1?

I don't think it's possible through %dd%. Create a variable in your script that contains day - 1 and then use Script Variable Value.

james
Contributor III

Reduced Document Name saving as today-1?

Vlad, i have a varaible for prior day, but are you sure you can use variable in the naming section?

MVP
MVP

Reduced Document Name saving as today-1?

I haven't done it, but I'm pretty confident that you can. I'd suggest trying it.

james
Contributor III

Reduced Document Name saving as today-1?

It doesnt take the variable, any ideas

MVP
MVP

Reduced Document Name saving as today-1?

Hmmm, if I click on the Script Variable Value field, it puts in %ScriptParameter%. So I'm guessing you need the percents around the variable, just like you do around other non-literal stuff. So probably %vMaxDate%? Can't seem to make it work for me with a variable. Do I need to click the Open Document button first? Well, that makes Document Fields available, but the Script Variable Value still seems to do nothing. Tried distributing it to myself anyway, and all it did was add my variable NAME at the end, not the variable value.

Man, QlikView, don't MAKE me read the reference manual. Hmmm, it would probably help if I wasn't reading the version 8.5 reference manual. Oh, dear. Where did they stash the 9.0 publisher reference manual? Can't find it in our local documentation area. Can't find it for download from QlikView.

Ah, well. So, uh... should be easy but apparently isn't? Sorry about being no help!

vgutkovsky
Honored Contributor II

Reduced Document Name saving as today-1?

%ScriptParameter,variablename% should work. E.g. %ScriptParameter,vMaxDate%

james
Contributor III

Reduced Document Name saving as today-1?

Still no luck, %ScriptParamter, vMaxDate% returns a "blank"; Thus once you run the PDF generator, it fails ans states cannot find vMaxDate, even thought vMaxDate is a variable created during the script execution....

Thanks to all for your input

vgutkovsky
Honored Contributor II

Reduced Document Name saving as today-1?

I'm stumped. The syntax should be correct but I'm getting the same behavior when I test it on my machine. It would be nice if Qliktech included this in the manual instead of forcing us to do it by trial-and-error...Anyway, sorry I couldn't be of more help. If you figure this out, can you please post the proper syntax here?

Thanks,

james
Contributor III

Reduced Document Name saving as today-1?

Indeed, I cannot find any directions on the PDF section at all...... Storm

Community Browser