QlikTip #26: Introducing Linked Objects in QlikView 10

In QlikView 10 a new (very, very nice) functionality will be added: Linked Objects

Instead of copying some objects to other sheets and having to change the properties of these objects independently you can link some objects together and change these properties only once.

All changes will be automatically shared with all other linked objects.
Linked Objects in QlikView do not follow a master/sleeve concept, so there is no master-object and other sleeve-objects which inherit their properties from the master-object.
Instead the linked objects are having equal rights and share properties like described in the reference manual of QlikView 10:

When two or more objects are linked they share all properties with the exception of size, position and display state (minimized, normal, maximized).
When you change the properties of one object the change is immediately reflected in the other linked objects. Linked objects may reside on the same sheet or on different sheets.

How to create a linked object:

There are two different approaches creating a linked object:

“Classic” way:

Use the context menu of an object and select Copy to Clipboard => Object or go to Menu => Object and Copy to Clipboard and Object; both can also be achieved with the shortcut Ctrl+C
Then use the command Menu => Object => Paste Sheet Object as Link

Drag’n’Drop:

Drag an object onto another sheet while pressing Ctrl+Shift, then the following icon will appear indicating that the object will be placed on the desired sheet as a linked object:

Icon shown during drag'n'drop and pressing Ctrl+Shift

How to change (shared) properties of linked objects:

As written in the reference manual:

If you are making any changes on the shared properties, these changes will be automatically and immediately reflected in other linked objects.

So there is nothing special to do. You just have to remember, that size, position and display state are not shared automatically.

How to change (unshared) properties of linked objects:

If you are making some changes to the unshared properties (size, position and display state) you have to synchronize theses settings to all other objects manually. But also this is quite easy:

Adjust the position of linked objects via context menu

Use the context menu of the object from where all other linked objects should inherit the size, position and display state and use the command Adjust Position of Linked Objects.

Deleting objects:

If you are deleting a linked object you will get the following message:

Message shown when trying to delete a linked object

So you can decide whether to delete only the selected object or all linked objects.

How to unlink linked objects:

Unlinking an object is easy:
Just use the context-menu of the object and go to Linked Objects => Unlink This object

Unlink the selected object via context menu

Some remarks on the linked objects’ IDs:

Linked objects share the same object ID. If an object will be unlinked a new object ID will be assigned to the unlinked object.

Linked objects in real life:

I personally like the approach of creating a sheet which is my template and where I design the structure of the interface placing all objects there which should also be visible on other sheets.
When creating a new sheet, I just copy all objects on my template-sheet and paste them as linked objects on the newly created sheet:

Template sheet with some objects to be linked on other sheets

When making changes I just have to go on the template sheet, making the changes there and they will be automatically made on all other linked objects:

An application using a lot of linked objects

If I have to make changes regarding position and size of the objects I am also doing this on the template sheet and then I am using the Adjust Position of Linked Objects functionality (as described above).
In production environment I just hide the “Source Objects” sheet with a “Show Sheet condition”.

For me this is the perfect solution which really meets my requirements.

Impact on existing applications and macros:

Good news! Since the linked objects share the same object ID there is no impact on existing applications and macros!

Conclusion:

Give Linked Objects a try! They will make your life as application designer in QlikView much easier!
I really, really like this feature :-)

What do you think?

Bookmark and Share

and tagged , , , . Bookmark the permalink. Both comments and trackbacks are currently closed.

8 Comments

  1. Ralph G.
    Posted October 11, 2010 at 11:53 | Permalink

    I can’t wait to get my hands on this! If it really lives up to its promise, this is the best new feature since SET back in 8.5!

  2. Luca F.
    Posted October 13, 2010 at 15:04 | Permalink

    agree, very good feature…

  3. nannalouis
    Posted June 22, 2011 at 10:41 | Permalink

    I am new to Qlickview and just installed the Personal Edition of Qlickview10 – but was unable to locate the option of unlinking objects in the context-menu.. Do you know if the feature has been removed from the personal edition?

    • Posted September 10, 2011 at 17:20 | Permalink

      No! I don’t think so!

      Certainly this option is only available for linked objects:

      Context Menu
      Linked Objects
      Unlink This Object

      Regards
      Stefan

  4. raj
    Posted March 27, 2012 at 06:01 | Permalink

    How to find if the object is linked and to how many objects and where they are in which sheets.

    • Posted March 29, 2012 at 21:53 | Permalink

      Do you mean programmatically or in the QV Developer’s designer GUI?

      Regards
      Stefan

  5. Robert van Drie
    Posted October 1, 2012 at 17:55 | Permalink

    How can I find out about linked objects from VBA?

    I like your approach of maintaining objects from a template sheet, but I encounter a number of things that could be improived to make life a bit more comfortable:

    1. I would like to position the items from VBA code in stead of altering all edited items manually every time I make a change to the User interface.

    2. Also, I personally think that QlikView is lacking a kind of “docking” mechanism.
    When I open my Sheet on a monitor with different size from the one that I engineered my application on, I need to adjust the size of the objects by hand, or by means of a VBA macro. (Since I tend to be lazy by profession, I use the latter 😉 )

    I implemented an AutoResize method in my modules, that is called whenever I change WorkSheet. Being able to apply the the “Adjust Position of Linked Objects” command programmatically would come in handy, since the code will only apply the new settings to the Template Sheet, where I define the Items that need to be shared by multiple sheets.

    I know this can be done by setting different Zoom Factors on different monitors, but this does NOT give me the effect I want, since it scales all items on screen (, and so they might become unreadable).

    3. It would also be nice if I could “hook” the AutoResize Method described above to the “resize” event of the application, instead of to the “OnActivate” event of every worksheet I am implementing…
    I would mean less events to hook on to, and also the code could run when I move my QlikView Docuemnt window to “my other screen”, since I would need to change the size of my window to do this. Now I must change Sheets before the common items are resized, which is pretty annoying.

One Trackback

  1. […] QlikTip #26: Introducing Linked Objects in QlikView 10: A tutorial by Stefan Walther of qlikblog.at, describing how to create and use Linked Objects in QlikView 10. […]