Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

Clearing multiple fields in one trigger


I have a few buttons where I clear multiple fields from the same table. However I always have to do it one by one using the "Clear Field" option. Is there a way to clear multiple fields in one step? (Note: I don't want to clear all fields)

Steve

11 Replies
ankit777
Specialist
Specialist

Hi,

add a button and add multiple clear filed actions on it , for each field you want to clear.

PrashantSangle

Use Clear All Trigger.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
zagzebski
Creator
Creator
Author

Thanks for the response. I realize I can do that but isn't there a way to clear more than one field in one action instead of having to enter multiple actins each time?

zagzebski
Creator
Creator
Author

Max - I don't wanrt to clear everything, but I do want to make sure all calendar fields are cleared.  Isn't therte a way (in one action) that you can celar multiple fields or all fields from a specific table - without having to do a separate clear field action for every field. For instance my calaendar table has 20 fields - do I have to have 20 different clear field actions??

ankit777
Specialist
Specialist

I think one action will clear one field only

stigchel
Partner - Master
Partner - Master

You can use something in set analysis to exclude all the calendar selections

Set vClearCalendar = "='[' & Concat({1<$Table={'Calendar'}>} $Field, ']=,[') & ']=' ";

Sum ({$<$(vClearCalendar)>} Amount)

Another work around is to create a table box, and bring all fields you want to clear.  In the table box caption, add "clear" icon.  When you click it, only the fields of this table are cleared.

Anonymous
Not applicable

Hi Zagzebski,

I don't know if I am too late in giving a response to your question, but I thought someone else might benefit from this.

I have the same issue where I had to hide all the fields having the name "Total" using a single button and a single action and I am using a straight table.So what I did is I took a set variable option in button actions and varible value as  "vTotal" and value as:

    CB.PNG     

          =if(vTotal=1,0,1)

Then I applied the variable "vTotal" in the expressions which I want to hide under the conditional text box and now it works fine for me.

CA.PNG

I am posting this reply so that it might help somebody like it did to me.

Thanks,

Not applicable

Just add multiple "Clear Field" actions within the individual button's properties. Then just select one field you'd like to clear within each action.

Not applicable

you can have a single button that performs multiple clears.  You would need to add an action for each field you want to clear in one button or text box - when you then click the object, all of the fields you wanted to ahve cleared, should be cleared