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: 
rohitk1609
Master
Master

How to Trigger NPrinting Task from Qlik Sense App or Task?

Hi team,

Two years ago I have created a process where I  execute the Qlik app, it triggers NPrining Task by using NPrinting APi, the document name is "How to use Qlik NPrinting APIs inside a Qlik Sense load script". Lately I have heard that NPrinting API call to do this exercise is depreciated. Same document is attached in this ticket.

Is it really deprecated? If yes, how to trigger NPrinting task from Qlik Sense?

Secondly, Is it possible to trigger Qlik Sense task from NPrinting?

Labels (1)
1 Solution

Accepted Solutions
Frank_S
Support
Support

Hi Rohit

It is possible to execute an NPrinting Publish Task or Connection reload from a Qlik Sense app using NP Api's.

However it is not possible to execute a Qlik Sense task as a depency of an NPrinting task. To execute and Qlik Sense job, I would suggest scheduling those jobs in Qlik Sense.

 

So for example, you can create a Qlik Sense task which reloads a Qlik Sense app containing API which reloads an NPrinting connection (as a dependency of completion of the Original Qlik Sense task that reloads an app for example.
Then Have another QS app which contains NP API which is used to reload a publish task (again as a dependency of the Connection Reload task).

 

Feel free to use the code inside these to QVFs if you wish. (keep in mind you must have Qlik Sense Sept. 2020 Patch 2 or later for the code to work).

 

If you need development assistance beyond what I've provided in the attached apps, please feel free to reach out to other Qlik Partners or Qlik Professional services.

 

BTW, please share where you heard that it is 'deprecated'. It is possible that what you heard is that the certain syntax is required with Qlik Sense Sept. 2020 and later versions. So yes certain 'code' was deprecated but the APIs have not been. The updated code is in the attached QVFs. 

There is an article about this change as well.
https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-June-2020-connecting-to-NPrinting...

 

Kind regards...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

5 Replies
Frank_S
Support
Support

Hi Rohit

It is possible to execute an NPrinting Publish Task or Connection reload from a Qlik Sense app using NP Api's.

However it is not possible to execute a Qlik Sense task as a depency of an NPrinting task. To execute and Qlik Sense job, I would suggest scheduling those jobs in Qlik Sense.

 

So for example, you can create a Qlik Sense task which reloads a Qlik Sense app containing API which reloads an NPrinting connection (as a dependency of completion of the Original Qlik Sense task that reloads an app for example.
Then Have another QS app which contains NP API which is used to reload a publish task (again as a dependency of the Connection Reload task).

 

Feel free to use the code inside these to QVFs if you wish. (keep in mind you must have Qlik Sense Sept. 2020 Patch 2 or later for the code to work).

 

If you need development assistance beyond what I've provided in the attached apps, please feel free to reach out to other Qlik Partners or Qlik Professional services.

 

BTW, please share where you heard that it is 'deprecated'. It is possible that what you heard is that the certain syntax is required with Qlik Sense Sept. 2020 and later versions. So yes certain 'code' was deprecated but the APIs have not been. The updated code is in the attached QVFs. 

There is an article about this change as well.
https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-June-2020-connecting-to-NPrinting...

 

Kind regards...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Ruggero_Piccoli
Support
Support

Hi,

Could you tell us which API you read is deprecated and where you read it? Thanks.

About APIs you can refer to https://help.qlik.com/en-US/nprinting/May2022/Content/NPrinting/Extending/Intro-Extending.htm this page is updated at every release. Please refer to it, that is the official documentation, to be sure an API is still valid or deprecated. Thanks.

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.
atiwari
Partner - Contributor III
Partner - Contributor III

Hello @Frank_S  Thanks for posting the qvf, I'm using this with Qlik Sense August 2022 Version and I encounter the below error.

 

The following error occurred:
Table 'RestNPTaskTriggerTable' not found
 
The error occurred here:
[_post_items]: LOAD [__KEY_data] AS [__KEY_data] RESIDENT RestNPTaskTriggerTable WHERE NOT IsNull([__KEY_data])
 
I see the RestNPTaskTriggerTable' is present in the Script, but still encounte the error. Do you know If what can be the root cause for this? AM I missing any steps?
Frank_S
Support
Support

Hi @atiwari 

 

I downloaded the app from this conversation and placed it into my supported environment. (this app only will work with current supported versions of Qlik Sense.) and it works as expected.

Frank_S_0-1715887400968.png

 

All I can add is that you make sure your Qlik Sense version is up to date.

Check that you have accurately configured your get and post connections (test succeeded) 

Carefully re-read the instructions inside the load script of the QS app found in this community post.. 
(Note that the load script is referring to NP App name. ie: replace QVFs with your NP App name that contains the NP connection that is behind your publish task).

 

Kind regards....

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

I will add that I have written subroutines NPrinting.qvs which you can easily configure and which are simplifying the whole process.

https://nprintingadventures.com/2019/04/08/nprinting-api-qlik-rest-subroutines/

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.