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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
dmohanty
Partner - Specialist
Partner - Specialist

Save Selections and Clear Button


Hi All,

I have a requirement like below. Please help me in providing steps/scripts to do so. It would be helpful if someone shows with a Sample QVW File.

  1. In my dashboard I have a simple List Box. The user should should select something from List Box  and close the document. Next time, when the dashboard is opened from Access Point, the same selections should be visible in List Box.
  2. After the selections are visible, User should select some more values in the List Box and a CLEAR BUTTON should be there to clear the new selections. This button should clear the new selections and go back to those selections which was found after opening the document.

N.B: All operations are performed on the docuemnt on Access Point (Plugin/AJAX)

Please suggest to achieve this.

Regards!!

1 Solution

Accepted Solutions
jonasheisterkam
Partner - Creator III
Partner - Creator III

You can find the API Guide QVW here

QlikView Core COM API Guide - Version 11

There the most commands with a example. A macro can be written in the modul part ander extra and call with a action. Actions can add to Button, TxtBoxes or on Document/Sheet/Field/Var changes. In the API QVW you find the macro part on the Automation Sheets.

Command to set the State as Clear State:

Makro:

sub test

ActiveDocument.SetClearState

end sub

Action:

call Makro

test

View solution in original post

13 Replies
jonasheisterkam
Partner - Creator III
Partner - Creator III

You can use Set Clear State. Right click on the top ajax menu. I think you can set it also with macro, what the user see next time depends on server settings, if he can create bookmarks you can do it with a macro too and load it on open.

dmohanty
Partner - Specialist
Partner - Specialist
Author

Hi Jonas,

Could you please throw some more light on this? I don't have experience on Macro as well, so no idea how to create this.

Where is Set Clear State exactly?

jonasheisterkam
Partner - Creator III
Partner - Creator III

You can find the API Guide QVW here

QlikView Core COM API Guide - Version 11

There the most commands with a example. A macro can be written in the modul part ander extra and call with a action. Actions can add to Button, TxtBoxes or on Document/Sheet/Field/Var changes. In the API QVW you find the macro part on the Automation Sheets.

Command to set the State as Clear State:

Makro:

sub test

ActiveDocument.SetClearState

end sub

Action:

call Makro

test

Not applicable

hi,

    I am not sure that it will work with (Plugin/AJAX).

Check this attach file and let me know.

Regards,

Ashutosh

Not applicable

Hi,

Just in the Clear buttoon add 2 actions.

     - The first one "Clear All" action

     - The second one "Apply Bookmark" with your previously saved and desired selections

Regards,

Jaime

dmohanty
Partner - Specialist
Partner - Specialist
Author

Hi Jonas,

Thanks a ton to you. Your attached API Guide a helped a lot and I was able to achieve my requirements by writing Macros.

Also, I created a Macro, so as when a Button will be clicked, a Pop Up should come up. Its working perfectly in IEPlugin, but not in AJAX mode. Could you please suggest on how it would be visible when opened in AJAX mode?

Regards!

dmohanty
Partner - Specialist
Partner - Specialist
Author

Thanks Jaime ,

Your tips were helpful a lot too along with Jonas's reply.

dmohanty
Partner - Specialist
Partner - Specialist
Author

Hi,

Somehow values were hardcoded in variable, but good approach. Though did not get a chance to work in server.

jonasheisterkam
Partner - Creator III
Partner - Creator III

Easy way: Use the Action set value to var. Its under External i think, i use the german version so i can't tell you the exact menu names. In the TxtBox you can use in the layout tab VAR = X then show. On the shown TxtBox you can set VAR to Y by a action. It will hide the TxtBox on click.