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: 
SonPhanHumanIT
Contributor III
Contributor III

On Demand Button

Hello Qlik experts,

I would like to know if there is a way to associate specific settings with the "Demand Button." Specifically, I want to achieve that when I click on Button 1, the "Test1" column is displayed, when I click on Button 2, the "Test2" column is shown, and when I select "Both," both columns should be displayed simultaneously. Unfortunately, I'm facing an issue where, every time I activate "Both," only the "Test1" column is being printed.

Thank you in advance for your assistance!

SonPhanHumanIT_0-1696500792459.png

 

Labels (1)
1 Solution

Accepted Solutions
SonPhanHumanIT
Contributor III
Contributor III
Author

3 Replies
SonPhanHumanIT
Contributor III
Contributor III
Author

I found the solution:

https://community.qlik.com/t5/Qlik-NPrinting/Qlik-Variables-in-Dynamic-File-Naming-is-not-working-pr...

You have to put a "=" before the function starts.

pallavi_96
Partner - Contributor III
Partner - Contributor III

Hi,

  • Create variable as vButton as assign a value as 0.
  • Then create 3 button in frontend
    • For 0 Button > Action and navigation > Action (Set Variable value) >Variable (vButton) > Value (1)
    • For 1 Button > Action and navigation > Action (Set Variable value) >Variable (vButton) > Value (2)
    • For Both Button > Action and navigation > Action (Set Variable value) >Variable (vButton) > Value (3)
  • At end end, use the following expression under show column if option for both the column
    • For Test 1 col > if(vButton=1,1,if(vButton=3,1,0))
    • For Test 2 Col > if(vButton=2,1,if(vButton=3,1,0))
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @SonPhanHumanIT 

I am not sure what actions you have set under buttons, but if you are just setting variables then this will not work with OnDemand NPrinting generation as variables are not passed as part of selection state. 

So  @pallavi_96  suggestion will not work with Nprinting OnDemand! It will work only in Qlik Sense but not when used with OnDemand Nprinting report trigger.

With that said you would have to base your solution on field value selection. That can still be achieved by using triggers under button actions to apply those selections but they must be field selections and not variables. 

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.