Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following problem:
Is it possible to start a NPrintingTask where User can change filtervalues by himself through API?
With the following script I can start my NPrintingTask, but how can I change the filtervalues?
<html>
<head>
</head>
<body>
<h1>NPrinting API task starter</h1>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script type="text/javascript">
(function(){
console.log("started")
var taskIDs=[
"76b87a16-e339-496b-80e7-ee2d98ac14ff"
]
$.ajax({
url: 'httpS://xxx:4993/api/v1/login/ntlm',
xhrFields: {
withCredentials: true
}
}).done(function(data) {
console.log(data);
for(var i=0;i<taskIDs.length;i++){
$.ajax({
type: "POST",
url: 'httpS://xxx:4993/api/v1/tasks/'+taskIDs+'/executions',
xhrFields: {
withCredentials: true
}
}).done(function(data) {
console.log("task "+i);
console.log(data);
if(i==taskIDs.length)
open(location, '_self').close();
});
}
});
})();
<!-- open(location, '_self').close(); -->
</script>
</body>
</html>
Any Ideas?
Or is it better to do this with the API?
Kindly regards
Chris
Hi,
Qlik NPrinting APIs support filters https://help.qlik.com/en-US/nprinting/September2018/APIs/NP+API/index.html#Filters.
Be sure that the user who runs the API calls has the correct rights.
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
Hi
I do not think that API can be used in this scenario.
My understanding of this post question is that Christian wants to dynamicly change filters associated with particular task (when actually running a task)-(similar to OnDemand filters beeing applied from current selection) ... API does not support this i think.
What Ruggero pointed to is API which support filters management where you can list all your filters, delete them, create new ones, update them or look at filter details BUT API is not allowing you to associate filter with particular task "on the fly"
cheers
Lech
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
Hi,
yes you are right. This is exactly what I want to do.
Actual we have NP16 und use the NPrinting-Extension with NPQueue, NPReport and NPTask.
In a qvw the User can select Year, Month and the NPrinting-Report he wants to generate.
This ist what we need in NP17 too.
OK with OnDemand we can make it too, but then the User must 1.download and 2.save the Report in the right path of Windows-Explorer. That's not practicable!
So, do you have any ideas how can i do this in NP17?
Regards
Chris
sorry mate - i dont get it..
this is exactly what on demand is for and report gets saved under the default download path, which btw you can change in your browser settings