Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to create an index, so when I click on a link or button, I first need to open a Qlik document and then active one of there sheets. Working with actions as was able to open the document but I am unable to set focus on the sheet I want. I tried to work with variables to assign the sheet ID but I'm not able to make them work "globally". Can anyone help me?
Thanks
hei
attach is an example
the first thing i did is creating a field with sheetid from to target file example2 in my case
that field is in both the source an target file
then in the Source file (Example1) i created a button with open qlikview document with property of transfer state
in the target file i created a macro and assigned him to the triger on open
save both files in the same folder on your computer to check to funcuntialtiy
Hi Liron,
Thanks for you time. I have two questions:
1) I see that you use a variable "vSheet" (in the macro) but I don't know where you assign a value to that variable
2) In my case the name of the tabs are not the same. Let's say in the first document the sheet is called "A" and in the second document sheets are called "B" and "C".
Could you please reformulate your example so I can achieve this?
Thanks
hei
if you press ctrl+alt+v you'll get to the variable editing screen
as for your second question
let me see if i understand for every sheet in the first document there is only one sheet you want to open in the second document
I have to documents.
First Document, have only one sheet (with sheetID = SH01). I have 2 buttons. Button 1 will call SheetID = SH02 that is in the second document. Button 2 will call SheetID = SH03 that also is in the second document.
The different between what Ineed and what you did, is that youworked using the same Sheets ID, and pass the "state" of the first sheet to the second sheet. Thisis not my case because 1) I'm working only with one sheet in the first document, and 2) All sheets ID are different.
Please let me know if you need more clarification.
I was thinking, in your macro you get the valueof the variable in the second sheet:
sub SelectSheet
set v = ActiveDocument.GetVariable("vSheet")
a=v.getcontent.String
ActiveDocument.ActivateSheetByID a
end sub
Is there a way to get the value of the variable "vSheet" that is set in the first document (having this macro in the second document)?
If there'sa function to do this, I can resolve my problem.
Anyone?
hei
well i dont realy understand what the problem
the only thing common between the files is that both need to have field with the name SHEETID
this field need to contain only the sheet ids from the target file
i changed a little bit the example
look if that what you want
pay notice that the ids of the sheets are diffrent between the files
Great example of this, thank you for that. But i'm not getting the SheetID field to transefer to the new application. It seems like the there'se only one filed that works in my application. I have checked that the name of the fields are identical and they are. I'm i missing some setting or anything?
Thanks again!
//A.