Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Lauri
Specialist
Specialist

Dynamic folders and cycled field

Hello, do I understand correctly that NPrinting can't create dynamic subfolders based on a variable containing the same values as a cycled field, as explained in the thread below?

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/Store-Nprinting-output-in-folder-and-sub-fo...

 

Labels (2)
1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, 

Sorry to say but yes - this is not possible.

cheers

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

8 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, 

Sorry to say but yes - this is not possible.

cheers

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Ruggero_Piccoli
Support
Support

Hi,

In Qlik NPrinting May 2021 SR3 there is this issue solved:

Qlik variables used in folder destinations were not working correctly
Qlik variables used to define folder destinations were not replaced with their values when used on publish tasks with multiple users or in reports with dynamic naming.

So it should work in the version you installed.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Ruggero_Piccoli 

Does this apply to scenario where variable is dependant on the field used in report cycle? That would mean that for every combination of fields used in cycles we now can create separate folder?

 

thanks

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Ruggero_Piccoli 

For the scenario where field used in cycles is also used in variable folder this is still not working. I just tested it on May 2021 SR3 version

Lech_Miszkiewicz_4-1647988407075.png

 

I have a Qlik Sense app created with regular Ctrl+0+0 test script. I created table 1 object for the report  and i created variable:

  • vfolder = "=Only(Dim1)" - this variable starts with "=" sign so it expands
    • Lech_Miszkiewicz_5-1647988449692.png

       

In NPrinting:

  • created report and added Dim1 dimension as cycle. 
    • Lech_Miszkiewicz_3-1647988369727.png

       

  • created destination and included vfolder variable as part of it
    • Lech_Miszkiewicz_1-1647988280707.png
  • created task added that dynamic folder destination to the publish test
    • Lech_Miszkiewicz_2-1647988326544.png

       

  • run task and the result was folder with name being only last value of the cycle field and all reports in it. So there is no way I could have 4 folders (A,B,C,D) created 
    • Lech_Miszkiewicz_0-1647988225192.png

       

 

I did the same tests ages ago and nothing seems to change since. My conclusion is that variable folder name cannot go to the level of fields used in cycle. So i stand by my answer to the original question I say that this is still not possible. 

Would you be able to comment on this?  Also @Frank_S  - I saw you have accepted Ruggero's solution so I assume it also works for you - could you please provide information as where in the above scenario I made a mistake that i did not get all 4 folders created?

 

thanks

Lech

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Ruggero_Piccoli
Support
Support

Hi @Lech_Miszkiewicz ,

You are right. The bugfix I posted was related to file names in case of cycles, so sorry it was my mistake.

I did tests also in May 2021 SR4 and variables used in destination folders are evaluated only one time for each publish task execution. It doesn't matter if one report with cycle is included in the publish task. The usage scenario is, for example, use a variable with today date as text to deliver all generated reports on a single folder daily. You schedule the publish task every day, the variable is evaluated one time with today date and used to create a single folder. 

Instead add a variable, for example, made with the formula GetCurrentSelections(Year) and inserting a report cycled by the field year will result in a single destination folder with all cycled reports inside. 

I hope I have to clarify and sorry again for my misunderstood.

Best Regarsd,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
Lauri
Specialist
Specialist
Author

Thanks for all of this good information. I followed advice in another thread to create dummy NPrinting users, one for each folder that I want, and then made the user variable part of the report destination.

I also put the dummy users into an NPrinting Group and made that Group a recipient of the Publish Task. That way they are easy to manage over time.

(The only problem with this method: Each dummy user must have a unique email address. It's not hard to make up fake emails, but there's a risk that some day one of those emails becomes real somewhere in the world.)

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

🙂 Thanks @Ruggero_Piccoli 

All good - I thought I was doing something wrong. At the same time I hoped you were right and that we would now have ability to create folders based on cycles. 

Anyway it is what it is - Ciao!

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Lauri 

It is slight chance that one of those emails becomes real. You can probably pick some random domain like

123@fghjkl.xyz  - so some random characters. It is very unlikely this email address will be created. Otherwise all steps you have taken as far as I know are the only possible way at the moment

 

cheers

L

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.