Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
georgina_spary
Contributor II
Contributor II

Macro to give 'Back button' functionality?

Hi I'm looking to add the same functionality that's in the Back button to a Macro - is this possible? Does anyone know how to do it?

Thanks

George

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

The API Guide tells me that you can use:

ActiveDocument.Back

View solution in original post

6 Replies
m_woolf
Master II
Master II

The API Guide tells me that you can use:

ActiveDocument.Back

Miguel_Angel_Baeyens

Hi there,

Although this is correct, I'd rather use the builtin function in a button or text object Action Type "Selection", Action "Back". These builtin functions are fully supported in QlikView, as opposed to macro code. It prevents another focus or issues and doesn't require any programming for the sake of compatibility.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

georgina_spary
Contributor II
Contributor II
Author

Thanks both v helpful - I hadn't spotted teh standard Action Type - but in this instance I want to go back only if a certain chart is active so a Macro fits the bill - and it's working!

Miguel_Angel_Baeyens

To get the action, go to an empty space in the sheet, right click and select New Sheet Object, select Text Object (or Button) and go to the "Action" tab. Click on the "Add..." button and on the dialog that shows up, select "Selection" under "Action Type" (left part) and "Back" under "Action" (right part). From now on, whenever you click on the text object or the button, it will go back one step in your selection state.

Regards.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

georgina_spary
Contributor II
Contributor II
Author

Thanks Miguel. I'll give this a go but there are added factors. Basically it's a table of inputfields, with 4 dimensions down the side (a fully expanded pivot chart) and several columns of Inputfields. If the user accidentally clicks slightly to the left of the input arrow in the Inputfield then all the dimensions in the table are selected, very annoying.

Adding mwoolf's macro to any one of the dimensions in the table (Settings.. Document Properties... Triggers.. Field event triggers) stops this happening, and within the same macro I've restricted it to invoke only when those fields are being selected within the table. The same fields are available down the side as filters and the user can still select them without triggering the macro.

I think the Action type 'Back' added presumably to the table, might be triggered even if the user clicked correctly on the input arrow, or clicked on the caption etc.. It might not. I will test it.

Hope that makes sense. Thanks for your useful input anyway

George

Not applicable

Hello,

How do you go back for the inputfield values, if a user enters a wrong value and wants to get the old values.

Not to reset them to the original, just like the BACK button, but for the inputfield.

Thank you!

Silviu