NPrinting API is available and very easy to use. With the NPrinting.qvs library it became even easier to implement. Few recent posts on community pushed me to come back to my library and bring in few improvements. What are they:
- Added Query Limit Parameter in form of variable vQueryLimit. This variable is set on line 104 and default value is 1000. Feel free to change it to whatever value you require. The purpose of it is to set limit of records which API returns from GET method and without it the limit is 50 records
- Added NP_DailySchedule Subroutine – this subroutine checks if task already run on the day and prevents from running task again. I found it useful when requirement is to run task after successful overnight reload, but only once a day, so if there is another scheduled data reload followed by chain of NPrinting trigger tasks, those would not run. It also allows to pick on which week days you want to run task.
- Added failover to NP_ConnectionReload subroutine – this prevents reload from failing in case when there is an issue with retrieving metadata generation status. I have experienced this error for some time and never was able to pin-point it. Solution was suggested by Qlik support to allow for failover. My failover solution allows for 5 errors in the row. If exceeded it exits script. https://community.qlik.com/t5/Qlik-NPrinting-Discussions/NPrinting-APIs-Unable-to-connect-for-result-set/td-p/106448
- Added sample Job NP_JOB_Reload_N_PublishTask_All to run all tasks from all listed NPrinting apps.
The above changes are available for download here.