Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sheet action to clear all fields from only a specific table?

Hello all! First post by the way...

I'm looking for the best approach for clearing all of the selections from any field in a specific table?

The idea here is that when a user click on certain tab, selections from certain tables will be cleared....but only selections from explicitly defined tables, not *all* selections.

I know I can do a "Clear all selections" as an activate sheet action, but I only want fields cleared from a certain table.

I found only one post that seemed to go in the direction I needed, by way of defining a variable but it may (it did) have gotten a little confusing for my skill level.

Anyone have an example of how to do this?

Thanks so much!

8 Replies
mov
Employee
Employee

Maybe there are better ways, but if the number of the fields in the table isn't too large, I'd create clear field action for each field you want to clear.

Not applicable
Author

Michael- funny you mention that...I stopped half-way through doing just that to ask the question, since the table I'm wanting to clear the selection fields from has quite a large number of fields =\.

mov
Employee
Employee

I thought so...

Here is another way, somewhat manual.  Create a table box, and bring all fields of this one table there.  In the table box caption, add "clear" icon.  When you click it, only the fields of this table are cleared.

Not applicable
Author

Michael-

That's definitely an option....the problem is users aren't going to be thorough about clearing the fields, and will most certainly result in e-mails asking me "why does my data look so screwy?!". 

If I could ensure that the fields from this specific table of interest are cleared upon activating the particular sheet of interest, I will know that the various objects on that sheet are not reflecting data filtered by any of the fields in the table I want to exclude.

See the scenario is I have two master calendars being defined in this application- one linked to dates of appointments and one linked to dates of referrals.  When the user is on tabs that relate to referrals, I don't want selections made on the appointment master calendar affecting data filtering.  Just as when they are working on the appointments related tabs, I don't want selection criteria from the referrals master calendar affecting data.

Does that background make sense as to why I'm trying to transparently "Clear fields" from a specific table upon a user activating certain sheets?

mov
Employee
Employee

Well, go to the "step one"... BTW, there shouldn't be too many fields in a calendar.  I can't  imaging more than a dozen useful fields.  More often half dozen is enough.

Not applicable
Author

You're right- the calendar has a limited number of fields (just things like year, week, weekday, etc) but to play it safe I also want to clear any selected fields from a couple of other tables too that could be confusing for the user.

So the band-aid solution  would be to set a clear field action  for each explicit field in the table(s) but I can't imagine there isn't a more elegant solution to simply clear selections from any field in a specified table in one fell swoop....surely there's a convention for it?

rwunderlich

In this case, I would consider using Alternate States instead of trying to clear fields. You can place each sheet in a different state.

-Rob

mov
Employee
Employee

Convention - not that I know of any.

Maybe you have fewer fields to keep than to clear?  If this is the case, lock the fields you want to keep, clear all, and unlock.