I would like to allow user to change the selections of the fields(Country,Sate,City) in other sheets. If i lock these fields user can only select them by unlocking them. I dont want user to go through another step of unlocking.
I think one way to achieve this is on leave sheets event --> trigger actions in the following order.
1. lock Country
3. lock city
4. clear all
5. unlock Country
6. Unlock State
8. Unlock City
Instead of triggering so many actions, can i just use one action like below
1. Clear Other fields ( can i specify multiple fields in this action)
your idea is good.. But after I make selections in the first sheet for Country, state and City.. i would like to have these selections remain in other sheets and clear any other selections. In your example atleast for the first time, we need to make selections in all sheets as it clears all selections.
and also If i make changes to selections for Country, state and City fields i want them to stay across all sheets.
I was looking for something similar myself.
This is my solution:
On active sheet I set 3 triggers:
Select in field <Year> with the expression: =GetFieldSelections(Year)
Select in field ....
Select in field ....
for each dimension I want to keep selected.
On exiting this sheet I wanted to keep the selections made with the exception of 1 (flag).
I solved this by:
Select in field <flag> with the expression left blank
Maybe this is your solution.
even though you already got your answer i think there's a room for one more answer,
for me i needed 3 more things:
- at least one selected value
- no impact from space in the value
- no effect what so ever by 'Clear All' event
i also wanted a dimension with only one selected value but without using the qlikview special feature because it destroys the server bookmarks, you can remove a field with 'Always one...' but when adding one the old bookmarks are missing it so they stop work, this is super annoying so i solved that too (:
you need to look in the 'File -> Edit Script' for comments, and also in the 'Tools -> Edit Module...'
if your using qlikview server to show data you can see that pressing the clear button keeps everything yet something is not working right, that is because there's an issue with using the Action: Actions -> Add -> Selection -> Clear All, it clears all fields without running the OnSelect event (bug?), this can be solved by doing it using macro, you can see the attached file for know how.
if for some reason you need to also unlock all fields ( maybe you hide all tabs and did button based navigation and you lock some dimension on each page) then change the macro function to this: