Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Edy_Tan
Employee
Employee

API Triggered NP Task variable do not get evaluated

I have a NP Task that generate an email with a date inside the subject.  When it is scheduled to run within NP it ran successfully with the date

55A8B819-DC93-4DC5-9A4D-31F7CA1A92D1_4_5005_c.jpeg

However if the same task was called from QS through NP API then it run successfully but the date was not evaluated

6F10F98B-9C76-4736-A7EB-27722310EAD3_4_5005_c.jpeg

 

Appreciate any suggestion on how to resolve this.

Labels (1)
1 Solution

Accepted Solutions
Ruggero_Piccoli
Support
Support

Hi,

Could you share screenshots of the email configuration in the publish task? Did you insert the formula in the object directly? Did you try to create a variable in the source app with the formula inside and use it in the subject? Did you try to force the output of the formula in the text format by adding =Text(...formula...)?

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.

View solution in original post

4 Replies
Ruggero_Piccoli
Support
Support

Hi,

Could you share screenshots of the email configuration in the publish task? Did you insert the formula in the object directly? Did you try to create a variable in the source app with the formula inside and use it in the subject? Did you try to force the output of the formula in the text format by adding =Text(...formula...)?

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.
Edy_Tan
Employee
Employee
Author

Thanks Ruggero

Screenshot of the email configuration in the publish task

Image 18-4-23 at 9.03 PM.jpg

Its referencing the variable report_date_time which is used to insert into the subject %%Variable_User_FD_Exception_report_date_time%%

I have tried to force the output of the formula by adding the text in front of the formula

Image 18-4-23 at 8.55 PM.jpg

Ruggero_Piccoli
Support
Support

Hi,

I tested in Qlik NPrinting May 2022 SR4. I created a publish task with a variable in the subject created with the same syntax as yours. I ran the task via Web Console and via API call and in both cases, as expected, the subject of the delivered email is correctly filled with the date. I'm not able to reproduce the issue.

Ruggero_Piccoli_0-1681829686526.png

Check that the API call has the correct task ID. I have no other idea. You could open a support ticket with everything we need to reproduce, including the Qlik Sense app and a link to this conversation. Based on my tests the feature is working as expected.

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.
Edy_Tan
Employee
Employee
Author

Customer confirmed it is working now for both Web Console and API call.  Thanks @Ruggero_Piccoli