Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
aatish12345
Creator II
Creator II

Navigation to different sheets using single button

Hi All,

Is it possible to navigate to the last accessed sheet from the current sheet using single button object.

For example I am coming to a current sheet from different sheets(either sheet 1 , sheet 2, sheet 3) using navigation option on button object...now I want to go to last accessed sheet from current sheet using single button object only.

Is there any kind of function or field available in Qliksense which is storing sheet names and sheet ids?

Your suggestions are welcome.

 

Aatish

1 Solution

Accepted Solutions
Andrei_Cusnir
Specialist
Specialist

Hello,

 

If my understanding is correct, then you have multiple sheets and on each sheet you want to put a Button that when clicked is going to navigate you to the previous sheet that you were active on. For example, if you are on Sheet 1 and then you go to Sheet 2, clicking the button on Sheet 2 will navigate you to Sheet 1 and then clicking the button on Sheet 1 will navigate you to Sheet 2. In case I missed something please elaborate in detail to the use case scenario of the issue.

 

This is currently not possible to achieve with 100% functionality, but there is a workaround that you can use. The reason why it is not possible to achieve with 100% functionality, is because currently there is no any function available that can give you the current active sheet ID. You can however achieve some similar behavior by following the steps below:

 

Lets assume that we have 3 different sheets:

  1. Name Sheet 1 and ID: SHEET_1_ID
  2. Name Sheet 2 and ID: SHEET_2_ID
  3. Name Sheet 3 and ID: SHEET_3_ID

Then you should follow the steps:

  1. Create a new variable: Name: varGoToSheet and Definition (The ID of the first sheet as default value):  SHEET_1_ID
  2. In Sheet 1 create a button
  3. Under Action and navigation add a new Action
  4. Action's label "Action"
  5. Action's action: "Set variable value"
  6. Variable: "varGoToSheet "
  7. Value: "SHEET_1_ID" (The value of the first sheet)
  8. Under navigation, choose "Go to sheet defined by sheet ID"
  9. For Sheet specify =varGoToSheet
  10. ====================
  11. In Sheet 2 create a button
  12. Under Action and navigation add a new Action
  13. Action's label "Action"
  14. Action's action: "Set variable value"
  15. Variable: "varGoToSheet "
  16. Value: "SHEET_2_ID" (The value of the second sheet)
  17. Under navigation, choose "Go to sheet defined by sheet ID"
  18. For Sheet specify =varGoToSheet
  19. ====================
  20. In Sheet 3 create a button
  21. Under Action and navigation add a new Action
  22. Action's label "Action"
  23. Action's action: "Set variable value"
  24. Variable: "varGoToSheet "
  25. Value: "SHEET_3_ID" (The value of the third sheet)
  26. Under navigation, choose "Go to sheet defined by sheet ID"
  27. For Sheet specify =varGoToSheet

What this does, whenever you click a button on the sheet, it will navigate to the sheet based on the value that is last saved and at the same time it will update the value with the sheet ID that you specified which means it will always save the sheet ID of the last visited sheet. If you rely solely on this workaround, you will notice that it doesn't work 100% of the time, however is the closest you can get to your use case scenario. 

 

Further explanation of what this will do:

  1. You open the app and go to Sheet 3
  2. Since the default variable is the ID of Sheet 1, when you click on the button, you will be navigated to Sheet 1
  3. At the same time it will update the value of the variable to the ID of Sheet 3
  4. So now you are in Sheet 1 and clicking the button you will be navigated to Sheet 3 while updating the variable to the ID of the Sheet 1
  5. And this will go on

There is a pending Feature Request [1] regarding having a function that will return the active sheet's ID, which will replace the section where you specify the exact sheet ID when updating the variable in the action, so you can upvote the idea and put your own comments to support it. However, if you would like to have this functionality natively, without having to do the workaround, you can create a new Feature Request [2].

 

I hope that this information was helpful

---

[1] https://community.qlik.com/t5/Suggest-an-Idea/Active-Sheet-Name-as-new-functions-on-Qlik-Sense/idi-p...

[2] https://community.qlik.com/t5/Knowledge-Base/How-To-Submit-Feature-Requests-For-Qlik-Products/ta-p/1...

Help users find answers! Don't forget to mark a solution that worked for you! 🙂

View solution in original post

4 Replies
Andrei_Cusnir
Specialist
Specialist

Hello,

 

If my understanding is correct, then you have multiple sheets and on each sheet you want to put a Button that when clicked is going to navigate you to the previous sheet that you were active on. For example, if you are on Sheet 1 and then you go to Sheet 2, clicking the button on Sheet 2 will navigate you to Sheet 1 and then clicking the button on Sheet 1 will navigate you to Sheet 2. In case I missed something please elaborate in detail to the use case scenario of the issue.

 

This is currently not possible to achieve with 100% functionality, but there is a workaround that you can use. The reason why it is not possible to achieve with 100% functionality, is because currently there is no any function available that can give you the current active sheet ID. You can however achieve some similar behavior by following the steps below:

 

Lets assume that we have 3 different sheets:

  1. Name Sheet 1 and ID: SHEET_1_ID
  2. Name Sheet 2 and ID: SHEET_2_ID
  3. Name Sheet 3 and ID: SHEET_3_ID

Then you should follow the steps:

  1. Create a new variable: Name: varGoToSheet and Definition (The ID of the first sheet as default value):  SHEET_1_ID
  2. In Sheet 1 create a button
  3. Under Action and navigation add a new Action
  4. Action's label "Action"
  5. Action's action: "Set variable value"
  6. Variable: "varGoToSheet "
  7. Value: "SHEET_1_ID" (The value of the first sheet)
  8. Under navigation, choose "Go to sheet defined by sheet ID"
  9. For Sheet specify =varGoToSheet
  10. ====================
  11. In Sheet 2 create a button
  12. Under Action and navigation add a new Action
  13. Action's label "Action"
  14. Action's action: "Set variable value"
  15. Variable: "varGoToSheet "
  16. Value: "SHEET_2_ID" (The value of the second sheet)
  17. Under navigation, choose "Go to sheet defined by sheet ID"
  18. For Sheet specify =varGoToSheet
  19. ====================
  20. In Sheet 3 create a button
  21. Under Action and navigation add a new Action
  22. Action's label "Action"
  23. Action's action: "Set variable value"
  24. Variable: "varGoToSheet "
  25. Value: "SHEET_3_ID" (The value of the third sheet)
  26. Under navigation, choose "Go to sheet defined by sheet ID"
  27. For Sheet specify =varGoToSheet

What this does, whenever you click a button on the sheet, it will navigate to the sheet based on the value that is last saved and at the same time it will update the value with the sheet ID that you specified which means it will always save the sheet ID of the last visited sheet. If you rely solely on this workaround, you will notice that it doesn't work 100% of the time, however is the closest you can get to your use case scenario. 

 

Further explanation of what this will do:

  1. You open the app and go to Sheet 3
  2. Since the default variable is the ID of Sheet 1, when you click on the button, you will be navigated to Sheet 1
  3. At the same time it will update the value of the variable to the ID of Sheet 3
  4. So now you are in Sheet 1 and clicking the button you will be navigated to Sheet 3 while updating the variable to the ID of the Sheet 1
  5. And this will go on

There is a pending Feature Request [1] regarding having a function that will return the active sheet's ID, which will replace the section where you specify the exact sheet ID when updating the variable in the action, so you can upvote the idea and put your own comments to support it. However, if you would like to have this functionality natively, without having to do the workaround, you can create a new Feature Request [2].

 

I hope that this information was helpful

---

[1] https://community.qlik.com/t5/Suggest-an-Idea/Active-Sheet-Name-as-new-functions-on-Qlik-Sense/idi-p...

[2] https://community.qlik.com/t5/Knowledge-Base/How-To-Submit-Feature-Requests-For-Qlik-Products/ta-p/1...

Help users find answers! Don't forget to mark a solution that worked for you! 🙂
aatish12345
Creator II
Creator II
Author

Yes Andrei,

 

I handled this situation with variable and sheet id 

 

Thanks for the help. It solved my issue.

Best regards,

Aatish

mattphillip
Creator II
Creator II

Hi Aatish,

I'm trying to do something similar, although I'm having trouble with the navigation action accepting the contents of my variable as a valid sheet ID.

For example, Sheet 1 action, set variable vWhatSheet = '6a3cfae8-c274-4aec-a420-7896439459fd'.

Sheet 2 Back button action Go to Sheet Defined by Sheet ID = $(vWhatSheet).

However this doesn't work. When I expand the function box I'm getting an error message about 'Garbage after a3cfae8' 

However, when I added a 'static' button using just the sheet ID string, it works fine.

Would you mind sharing how you got this to work? Any help would be most appreciated.

Matt

Marco_Imperiale
Contributor III
Contributor III

in facts, it doesn't works as described.
It seems you can't go to a sheet using a variable in this way:

='$(IdSheet)' 

It works only in this way:
='b4930339-a7de-409a-a9de-85022025dd8d'