Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
fkeuroglian
Partner - Master
Partner - Master

select field after push "clear all"

Hi experts! i would like to know if it possible to select a  field after push "clear all" , thank you

Fernando

9 Replies
jjordaan
Partner - Specialist
Partner - Specialist

Hi Fernando,

You can use a trigger for that.

Create a button with 2 actions actions;

1. Action type : clear all

2. Action type: Select in field

Hope this helps

fkeuroglian
Partner - Master
Partner - Master
Author

Hi Jeroen, but if i do not want to create a special button with a trigger, i want to select the field after the user CLEAR ALL in the acces point(web mode)

thank you a lot

Fernando

jagan
Luminary Alumni
Luminary Alumni

Hi,

Is Clear All is default Qlikview clear button or Button object with action?  If it is button object then you can add one more action Select In Field.

If it is a default Qlikview Clear All button then this is not possible.

Regards,

Jagan.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

If the selection is always the same, you can set a "clear state" - ie the state of the document after you click Clear All.

     * make the selection(s) that you want to have after clicking Clear All.

     * menu Selections | Set Clear State

Now when you press Clear All, that selection is made.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jjordaan
Partner - Specialist
Partner - Specialist

Hi Fernando,

I don't think that is possible.

A workaround could be that you would create a Macro.

First retrieve if there are any current selections If(IsNull(GetCurrentSelections()), 'Yes', 'No').

If it is no then you could execute a Macro to make a selection.

robert_mika
Master III
Master III

Jeroen how would you define this in VBA?

So the macro will trigger when the Clear All option has been made?

fkeuroglian
Partner - Master
Partner - Master
Author

Hi jonathan, your solution works ok and great, but in my case if i wanto to set clear state contains a variable? not a field

for example , i want that every time that the user "clear all" the selections return to the last day,last month current year, for example.

this could be possible?

thank you

Fernando

fkeuroglian
Partner - Master
Partner - Master
Author

HI Jeroen, do you have an example macro to do this

what function do you call that replaces or call "clear all"

thank you a lot

Fernando

jagan
Luminary Alumni
Luminary Alumni

Hi Fernando,

Try like this, create a variable

vCurrentSelections = GetCurrentSelections()

Now in Document Properties -> Triggers -> Variable Event Triggers -> Select vCurrentSelections -> On Change -> Add Actions-> Select -> Select In Field ->

Field Name : Dim1

Expression : =If(Len(Trim(vCurrentSelections)) = 0, '2015', '(' & GetFieldSelections(Dim1, '|') & ')')

Hope this helps you.

Regards,

Jagan.