Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

Macro - what have I got wrong?


Hi,

I'm trying to establish a pyramid-like structure in our company, where management has a Dashboard with all the KPIs (only the results in form of traffic_lights), but they can link to any of the team-specific apps to view the data in detail.

=> To achieve just that and enable the managers, by clicking, to "jump" not only to one of the team-specific apps, but to the very
      KPI-display they have just viewed the result of, I have to use a macro because the triggers in our QV_version don't all work, in

      particular, triggers on opening a document via document_chaining don't work reliably in AJAX - that has been confirmed to us

      by QlikTech and we never updated, so it's still the same.

The macro has actually been written for us by an external consultant and I know it works, we had it in use at a time. I will attach it to this post.

I now have an inline table (in a qvs file) that is labeled 'KPIs_to_be_shown' and has just one field labeled 'KPI'. The one value of this field is 'Fluktuation'.

I also have a >> SET HidePrefix = '__' << command in place to make sure the selection on the field >> KPI << does not show up in the statusboxes in my apps.

<=> Although I have all the pieces in place, or so I believe, it doesn't work - when I activate the document_chain to open the targeted app, then the starting_sheet opens, not the KPI in question.

Can anyone tell me what I got wrong here?

Thanks a lot!

Best regards,

DataNibbler

P.S.: Never mind the German commentary - it says no more than what I just told you.

P.P.S.: Oh - there's one more particular: I haven't given a name to the macro, I just pasted it in the corresp. editor - might that be an error?

3 Replies
datanibbler
Champion
Champion
Author

OK,

it seems the macro (or module) just needs a name. Now it seems to work fine.

datanibbler
Champion
Champion
Author

O_O -

It seems I really need some help on this one, please.

I seem to be alternating between

- "The macro works" - but then, the worksheet with that KPI (SH19) is ALWAYS opened, whether I open the app
  via doc_chaining or normally - and

- "The macro doesn't work" - then the worksheet that should normally be the starting_page (SH02) is ALWAYS

    opened, whichever way I open the app.

I really cannot tell what's wrong because the two sheet_IDs are in the macro (it's above, but I'll attach it again).

Also, there is a "Failsafe" in the macro for the possibility that there is no selection on the field >> __KPI << - which

should be the case when the app is opened the normal way.

Thanks a lot for any help here!

Best regards,

DataNibbler

datanibbler
Champion
Champion
Author

Hi,

I  believe someone here must have some experience with using macros in QlikView?

I know it's generally not recommended, but like I said, I have no choice here since the kind of triggers we need does not work in our version and we never updated to a newer version yet.

Right now, it's back to the macro never working, whether I open the app from the Management-Dashboard (via chaining) or directly - I have experimented a bit with the >> SET HidePrefix << and such.

Thanks a lot!

Best regards,

DataNibbler