Qlik Community

Ask a Question

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

Announcements
Qlik Insider - Maximize your investment, Join this webinar, May 26th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
mikeslade
Contributor III
Contributor III

Nprinting Publish Tasks 'Missing' in API trigger query

Hi

I have Qlik Sense triggering publish tasks in Nprinting set up after the below.

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/How-to-use-Qlik-NPrinting-APIs-inside-a-Qli...

Recently, some have stopped working and these are all older task in terms of created date. The publish task works directly from Nprinting and is enabled, however the older ones (I have nothing pre 22/10/2018 created date) - If I recreate the task and it has a new created date the API works as it is now populated. I can't see any date restriction in the data load edit script. This was noted last week, but I thought was a one off event and a new task was created, but now another has stopped working and is another pre October created task

The below is the part that should return, but is returning nothing for the tasks created before 22/10.

Has anybody experienced this before? 

RestConnectorMasterTable:
SQL SELECT
"__KEY_data",
(SELECT
"id",
"name",
"description",
"type",
"created",
"lastUpdate",
"lastExecution",
"enabled",
"appId",
"__FK_items"
FROM "items" FK "__FK_items")
FROM JSON (wrap off) "data" PK "__KEY_data"
with Connection (URL "$(vEndpoint)", HTTPHEADER "Cookie" "$(vCookie)");

[items]:
LOAD [id] AS [id],
[name] AS [name],
[description] AS [description],
[type] AS [type],
[created] AS [created],
[lastUpdate] AS [lastUpdate],
[lastExecution] AS [lastExecution],
[enabled] AS [enabled],
[appId] AS [appId]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_items]) and [name]= $(vNPrintingPublishTaskName);

Labels (2)
1 Solution

Accepted Solutions
Lech_Miszkiewicz

This is likely to the fact that by default API Call returns only 50 records. To override this limit you need to use Query parameter.

We have discussion about this on my blog as well as my NPrinting.qvs library takes it now into account.

You can download file and look for vQueryLimit variable which I use accross my GET calls.  You can use it as variable (as I do below....I also assume that limit 1000 is enough for me but you can change it to whatever value you like) . You can also hardcode QUERY "Limit" "your number limith ere" in each of your calls

 
// Query Limit Parameter

Let vQueryLimit = '1000';
 
SQL SELECT
"__KEY_data",
(SELECT
"id",
"email",
"domainAccount",
"subFolder",
"folder",
"created",
"timezone",
"lastUpdate",
"userName",
"locale",
"enabled",
"__FK_items"
FROM
"items" FK "__FK_items")
FROM
JSON (wrap off) "data" PK "__KEY_data"
WITH
CONNECTION( URL "$(vURL_User)", HTTPHEADER "cookie" "$(vCookie)", QUERY "Limit" "$(vQueryLimit)" )
;

 

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

2 Replies
Ruggero_Piccoli
Employee
Employee

Hi,

Did you checked the logs?

You could also give a check at the On-Demand executions page explained in https://help.qlik.com/en-US/nprinting/November2019/Content/NPrinting/AdministeringQVNprinting/Tasks/...

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

This is likely to the fact that by default API Call returns only 50 records. To override this limit you need to use Query parameter.

We have discussion about this on my blog as well as my NPrinting.qvs library takes it now into account.

You can download file and look for vQueryLimit variable which I use accross my GET calls.  You can use it as variable (as I do below....I also assume that limit 1000 is enough for me but you can change it to whatever value you like) . You can also hardcode QUERY "Limit" "your number limith ere" in each of your calls

 
// Query Limit Parameter

Let vQueryLimit = '1000';
 
SQL SELECT
"__KEY_data",
(SELECT
"id",
"email",
"domainAccount",
"subFolder",
"folder",
"created",
"timezone",
"lastUpdate",
"userName",
"locale",
"enabled",
"__FK_items"
FROM
"items" FK "__FK_items")
FROM
JSON (wrap off) "data" PK "__KEY_data"
WITH
CONNECTION( URL "$(vURL_User)", HTTPHEADER "cookie" "$(vCookie)", QUERY "Limit" "$(vQueryLimit)" )
;

 

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