Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Selections are cleared with OnActivateSheet

Can somebody help me with the following problem:

When I enter the sheet 'Orders' I only want to see the orders with OrderStatus=O. I don't want to see the orders with OrderStatus=I.

This works with Sheet Properties (Orders) --> tab Triggers --> OnActivateSheet --> Button Edit Action(s) --> Action ' Select in Field' --> Field 'OrderStatus' and
'Search String' O. But when I select in other sheets more filters and this selection doesn't include orders with OrderStatus=O and I'll open the sheet 'Orders' again all my current selections are cleared. How do I solved the problem of clearing my current selections?   

1 Solution

Accepted Solutions
Not applicable
Author

See the answered discussion of Show message 'No data to display' where I ask my requirements more clear.

View solution in original post

10 Replies
Not applicable
Author

if i understand your question correctly, you can have two action, first action would be clearing all the filters and second one will do your job of selecting the Order status what ever you want..

Not applicable
Author

Thank you for your reply. I want the currect selections, other than the OrderStatus selection, not to be cleared when opening sheet 'Orders'. 

Not applicable
Author

OnActivate Orders Sheet,

Use Clear Field - OrderStatus.

This will only clear the OrderStatus selection keeping the other selections.

Not applicable
Author

I've tried the solution, but it doesn't solve my problem. 

I want Qlikview to save my current selections (this selection doesn't include orders with OrderStatus=O) while I enter tab 'Orders'. Because this tab doesn't contain data, Qlikview is clearing automatically his selections. Ideally I want to see the message ' No data' and save my current selections, but how I realize that?    

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

It sounds like QV is clearing the selection because the existing selections and the OrderStatus=0 selection are mutually exclusive. In such a case, QV assumes that the most recent selection should apply and clears the old selection.

If you want to preserve the prior selections, I suggest that you add to your trigger a Replace Bookmark action to save the selections in OnActivate, and add a trigger to OnDeactive to apply the bookmark to reinstate your prior selections.

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

I've tried your solution, but unfortunately it doesn't work. Do you have un other solution?

My current selections contains only records with Orderstatus=I. When I go to tab 'Orders' the next triggers are being activated in OnActivate:

1. 'Create Bookmark' to save the current selection with Orderstatus = I

2. Select field with field 'OrderStatus' and Search String 'O'

3. 'Replace Bookmark' to add the selected field 'OrderStatus=O' to the current selections with OrderStatus=I.

Now you can see the mutually exclusive of Orderstatus I and O. I want Qlikview to ignore the selection of OrderStatus = O if the current selections only contains records with OrderStatus I. On this way the current (prior) selections will preserve.    

Anonymous
Not applicable
Author

if you wanted to clear only one field when you open a sheet or click any button what you have to do this: In the actions select Select in Field and give the field name under the Field space available and where ever it says search string: give any value like this 'xxxx'  which is not present in the data. for your reference see the attched screen shot.

if you need further assistance attach  a sample document and your requirement explanation.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Perhaps I did not fully understanding your requirement. You say that you want to "ignore the selection" - What does that mean?

What do you want to do when you enter orders and the current selection contains only OrderStatus = I?

  • Do you mean do not apply the OrderSelection = O?
  • Do you want to change the selection (which will cancel selections resulting on only OrderStatus=I)?
  • And then restore those selections when you leave the sheet?
  • Or do you want to suppress the calculation or display of certain objects on the sheet?

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Jonathan,

If the current selections only contains records with OrderStatus = I and you enter sheet 'Orders' with the default selection OrderStatus =O, then I want to see the message 'No data to display' in sheet 'Orders'. When you leave this sheet I want the current selections stays active.

I'll hope this explanation will be more clear for you.

Kind regards,

Carola