Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to make the information contained in a text box change depending on the selection of an object in a container.
So if a user selects Labour Costs, they will see a certain body of text in the text box to the right
And if they select Labour Costs by Business Unit they will see different text
Is this possible to do?
Hello,
If my understanding is correct, you want to choose different visualizations to display in the container and based on the selection, you would like to update the text in the "Text & image" object. This use case scenario natively is not supported however the logic behind it is: Every time the a tab is selected in the Container object, a public variable would get updated as well and this variable would have the text that you want to display. I would suggest you to create a Feature Request [1] and elaborate in detail why this would be beneficial for you.
Although natively it is not supported, you can achieve a similar behavior with the use of Variable input object. Here are the steps that I have followed:
What is going to happen in this use case scenario:
What happens when you choose values in the Variable input:
I believe this is as close as you can get to your use case scenario. I hope that this information was helpful.
---
Hello,
Please take a look at my following approach and let me know if this has helped you resolve the second issue:
Only({<
Department={"$(=Pick('$(varSelectedDepartment)', 'DepartmentA', 'DepartmentB', 'DepartmentC'))"},
Chart={"$(=Pick('$(varSelectedChart)', 'Chart1', 'Chart2', 'Chart3'))"}
>}Commentary)
This expressions uses the Function Pick() which will return the Department and Chart title based on the selections in the variables. Additionally the Set expression will show only the commentary from the dataset where the criteria are matched. e.g. Only where Department field equals with DepartmentA and at the same time the Chart field equals with Chart1 etc.
This is the result that I have:
As you can see when the Department A and Chart 1 are selected, the corresponding message is displayed in Text & image object. The same thing happens for when the Department C and Chart 1 are selected etc. If my understanding, of your use case scenario, is correct, then I believe that this is the closest that you can get to your expected output.
if this has helped you resolved the second issue, please mark it as solution to the issue as well. This will allow other community members to find this answer easily in case they need to.
Hello,
If my understanding is correct, you want to choose different visualizations to display in the container and based on the selection, you would like to update the text in the "Text & image" object. This use case scenario natively is not supported however the logic behind it is: Every time the a tab is selected in the Container object, a public variable would get updated as well and this variable would have the text that you want to display. I would suggest you to create a Feature Request [1] and elaborate in detail why this would be beneficial for you.
Although natively it is not supported, you can achieve a similar behavior with the use of Variable input object. Here are the steps that I have followed:
What is going to happen in this use case scenario:
What happens when you choose values in the Variable input:
I believe this is as close as you can get to your use case scenario. I hope that this information was helpful.
---
Thank you so much, that's the most helpful response I've had on the forums.
@Andrei_Cusnir I was wondering if you might be able to provide a little more help here. I've implemented the solution that you recommended, and it's been working very well there's just one final piece to the puzzle.
I am needing to work with a large number of different commentaries, there's 11 departments with an average of 5 objects each, each month, that need their own commentary, so creating a variable for each permutation is not possible. In order to overcome this, I've imported a fact table with columns Period, Department Description, Chart and Commentary, which has been loaded successfully.
I would like it that when a user selects a department, month and chart it will then produce the commentary. This works except for the chart field - I am trying to make Qlik select the chart field corresponding to the variable selected from the dropdown. So I'm tying to do something like
If v.SelectedContainer = 1, Chart = 1
I have been able to get this to work if I use a button to show commentary - i've used action Select Values matching search criteria, and set the value to $(v.SelectedContainter) This works perfectly, so the data is sound, but it's obviously not ideal to have users having to press an extra button to show this commentary. Is there a way I can implement this in one step?
Hello,
Please take a look at my following approach and let me know if this has helped you resolve the second issue:
Only({<
Department={"$(=Pick('$(varSelectedDepartment)', 'DepartmentA', 'DepartmentB', 'DepartmentC'))"},
Chart={"$(=Pick('$(varSelectedChart)', 'Chart1', 'Chart2', 'Chart3'))"}
>}Commentary)
This expressions uses the Function Pick() which will return the Department and Chart title based on the selections in the variables. Additionally the Set expression will show only the commentary from the dataset where the criteria are matched. e.g. Only where Department field equals with DepartmentA and at the same time the Chart field equals with Chart1 etc.
This is the result that I have:
As you can see when the Department A and Chart 1 are selected, the corresponding message is displayed in Text & image object. The same thing happens for when the Department C and Chart 1 are selected etc. If my understanding, of your use case scenario, is correct, then I believe that this is the closest that you can get to your expected output.
if this has helped you resolved the second issue, please mark it as solution to the issue as well. This will allow other community members to find this answer easily in case they need to.
Thank you so much again, you've been so helpful. Cheers mate 🙂