Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Does anyone have a good workaround for on demand and variables not being passed in.
As an example in my dashboard I have a variable vUnitsDollars which is set to 0 for Units and 1 for dollars. In my expressions I use:
if(vUnitsDollars=0,sum(Units),sum(NetAmount)
I then have a variable switch where the user can select units or dollars. This works great in Qlik Sense but this is not passed into on demand.
I know I can use a data island but how do I create a toggle switch that will change the values of the data island and then pass this to the variables.
Thanks in advance.
Michael
As a follow up to your question about hiding selection - sure there is no issue with that, but there is a catch...
If you are going to use buttons like in my example with 2 blue buttons you have to configure them before you hide fields, because this object allows to configure only visible fields. To configure hidden fields you would have to edit object in Developer mode (aka with url suffix "/options/developer"
--> right click --> Developer and manually edit properties of such object) which may not be worth an effort.
So all what you do is configure objects while fields are still visible and when you are happy with results add that line to your script " TAG FIELDS UnitDollar WITH $hidden ;" and reload to hide field:
this is the result you would get - I dont know how to get rid of "hidden selection applied" message though, I reckon it needs to stay there:
regarding hiding fields - yes - there are multiple methods:
or
or mention earlier:
Correct & Correct, that is exactly how it works.
cheers
Hi Michael,
what do you mean by saying: "but how do I create a toggle switch that will change the values of the data island and then pass this to the variables"
What problems are you facing?
This is my workflow:
Am I missing something here?
Obviously the object you will be using to toggle (filter pane, native buttons with actions select in field or other....) that is up to you.
Principle is the same: you have island table, you make it always one selected values and you use expression in variable to read that value.
cheers
Hello,
Is there a way to do this so that the field does not show up in the filters at the top?
I want to make the transition from the variable (which I use the variable input) to a field look the same for the users.
Thanks,
Michael
Hi @mstoler
I forgot to mention 2 important things:
Obviously using second option requires a lot more work: creating button for each value, then if you want to make it looking nicer you would have to write expressions to capture what is current selection and based on that likely to apply colour on buttons which would indicate what is selected (or if nothing is selected then default state).
But all above is simple QlikView/Qlik Sense work we all were doing for years, so nothing new there.
cheers
Lech
As a follow up to your question about hiding selection - sure there is no issue with that, but there is a catch...
If you are going to use buttons like in my example with 2 blue buttons you have to configure them before you hide fields, because this object allows to configure only visible fields. To configure hidden fields you would have to edit object in Developer mode (aka with url suffix "/options/developer"
--> right click --> Developer and manually edit properties of such object) which may not be worth an effort.
So all what you do is configure objects while fields are still visible and when you are happy with results add that line to your script " TAG FIELDS UnitDollar WITH $hidden ;" and reload to hide field:
this is the result you would get - I dont know how to get rid of "hidden selection applied" message though, I reckon it needs to stay there:
Thanks,
And also I can use a default bookmark to assign an initial default value.
I assume the tag fields with $hidden is similar to the set HidePrefix='_' ;
Thanks again!
Michael
I would not use default bookmark-it may not be supported by nprinting. Similar to triggers in QlikView
I am not 100% sure about it, but i had issues with it in the past.
Hello,
If I can't use default bookmarks then how can I set the default value of the field?
Michael
you dont,
you can make variable to always set to one default value even if nothing is selected - just like i did. Using Max() or Min() returns only one value right?
I mentioned that in my previous comment already:
regarding hiding fields - yes - there are multiple methods:
or
or mention earlier: