Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
hugmarcel
Specialist
Specialist

OnOpen not working correctly in Ajax QV 11 SR1?

Hi

In Ajax client, when a doc is opened, the onopen built-in trigger in document properties menu is set to filter a field by another one as such:

TheWeek = max(FactWeek).

This used to work fine in Ajax Client Version 10, but it does not work in Client Version 11 any more.

Any ideas?

Marcel

23 Replies
Miguel_Angel_Baeyens

Hi Marcel,

Is that an direct selection by action or a macro? Does it work if you open the file with IE Plugin?

Hope that helps.

Miguel

hugmarcel
Specialist
Specialist
Author

- I do not use macros, so its a direct selection.

- It used to work in QV 10 with the Ajax Client

- It still works with the IEPlugin QV 11!

- The trigger works in Ajax client when I set e.g. TheWeek = 14. So the MAX Function seems to be a problem for the Ajax Client

Miguel_Angel_Baeyens

Hi,

It's working as designed: OnOpen events will not trigger when using the Ajax client. I have not tested it in version 10, but I'm using version 11 SR1 update (build 11282) and it works as you mentioned. See in the Reference Manual section 30.8 Document Properties: Triggers.

Hope that helps.

Miguel

hugmarcel
Specialist
Specialist
Author

Well, the QV 11 doc does not seem to be fully consistent. As the OnOpen trigger works in Ajax Client when I set a scalar value (14) instead of using a function to a field max(FactWeek).

Any idea how to save this? E.g. it still does not work in Ajax Client when I put the max(FactWeek) into a variable and then set TheWeek = vMaxWeek.

Presetting the field after script reload is not appropriate, as the filtering depends to the windows logged in user.

Thx

Miguel_Angel_Baeyens

Hi Marcel,

My guess (I'm not in part of the R&D team, they can check this out and give a more accurate answer) is that now QlikView Server uses bookmarks to keep values and layout from users, the so called "Session Recovery", that creates a bookmark, unless disabled in the QMC, for each user that logs into the AccessPoint and stores the state (selections) as well as layout (scrolls, current tab, and so). This bookmarks can be deleted and checked in the Shared objects part of the correspoding document in the Documents or User Documents tab of the QMC.

Bookmarks can store values of variables, so you can try applying a bookmark instead, and the value keep that Max(). Anyway, as I mentioned above, and as you can see in the documentation, some macro functionality is limited in the clients, and specially in the Ajax client, to prevent unexpected results.

If I were you, I'd create a button in the landing page so the user can click on it and "Start" browsing the application. This button sets everything as required, and it all happens on the background.

Hope that helps.

Miguel

hugmarcel
Specialist
Specialist
Author

Hi Miguel

ok thank you for this answer.

I am now setting a Variable in the Script and then reuse this variable in the OnOpen Trigger of the Ajax client. This works.

I will think about your "button based" solution, in order to preset windows-login dependant filter criteria on document startup.

thx a lot - Marcel

Not applicable

Hello,

I'm having the same problem.

I've created a var vMaxDate in the script but which action should i use in 'On open' ?

Regards

ivan_will
Partner - Creator II
Partner - Creator II

Hi all, having the same!

Waht a bug That QV, a?

Also using triggers on open sheet - the same problem!

QlikTech - please do something!

Miguel_Angel_Baeyens

Hi,

What it is not working? Are you using the Ajax client or the IE Plugin? Are you running macros or actions on events? What version of QlikView are you running?

OnOpen events triggered actions (not macros) such as External, Set Variable should work just fine.

Hope that helps.

Miguel