Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

A way to change object IDs

Hi,

I'm looking for a way to change objects IDs in a sheet.

Is there a way to do that with some automation ?

I have tried macro, but it seems that this property is read-only.

Thanks for your attention.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You can change the object ID's as far as I know. Below are two examples from the API Guide document:

rem ** Change unique ID of list box **

set LB = ActiveDocument.GetSheetObject("LB06")

set boxprop=LB.GetProperties

boxprop.Layout.Frame.ObjectId = "Listbox6"

LB.SetProperties boxprop

rem ** Change unique ID of a chart **

set g = ActiveDocument.GetSheetObject("CH01")

set gp = g.GetProperties

gp.GraphLayout.Frame.ObjectId = "MyChart"

g.SetProperties gp


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

You can change the object ID's as far as I know. Below are two examples from the API Guide document:

rem ** Change unique ID of list box **

set LB = ActiveDocument.GetSheetObject("LB06")

set boxprop=LB.GetProperties

boxprop.Layout.Frame.ObjectId = "Listbox6"

LB.SetProperties boxprop

rem ** Change unique ID of a chart **

set g = ActiveDocument.GetSheetObject("CH01")

set gp = g.GetProperties

gp.GraphLayout.Frame.ObjectId = "MyChart"

g.SetProperties gp


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks a lot !

I need to dig more in "frame" direction...

tim_at_ford
Contributor III
Contributor III

Gysbert

I was hunting for a way to change the object id for grids so when they are exported to Excel you place the name of the grid instead of something like "CH263".

Now I was reading your post from 2012 a couple of times over, especially the code above. 

My question is, the code above you place this in the script where reloading of all your tables are done, correct?