Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

To Select Blank Value Using Trigger

Hi,

I have to select a set of values(including blank) in a particular field as default while leaving a sheet.

And I am using the following triggers

Select in Field:

Field: FIELD

Search String: only({<FIELD={"=len(FIELD)=0"} >}FIELD)

Toggle Select:

Field: FIELD

Search String: (Value1|Value2)

This works only if there is no selection on that FIELD. If there is any other selections, it is not working. Even I have tried 'Clear All Field' Trigger. But doesn't works.

Please help to find a solution.

Thanks & Regards,

Vinitha Mano R.

10 Replies
Not applicable

Re: To Select Blank Value Using Trigger

Are you really trying to clear the selections or select all the values in that field? Try changing the search string as *

sundarakumar
Valued Contributor II

Re: To Select Blank Value Using Trigger

Hi Vinitha,

R u trying to do something ike document chaining?

Plese explain "doesn't work"...

-sundar

MVP
MVP

Re: To Select Blank Value Using Trigger

if I understand I think you coulduse a trigger like that

select in field        

field          field

expression

=if(GetSelectedCount(field)>0,

'(' & concat(if(len(trim(field))>0, '"' & field & '"' ), '|')  & '|""' &  ')' ,

'('  & '""' &  ')'

)

the idea is to create a search expression with the selected values (concat) and then add at the end the blank value

("firstselected"|"secondselected"|...........|"lastselected"|"")

see attachment

Not applicable

Re: To Select Blank Value Using Trigger

Hi,

Since the trigger with condition "only({<FIELD={"=len(FIELD)=0"} >}FIELD)" is working if there is no selections on that field, I have tried to apply 'Clear field' trigger before applying "select in Field" trigger.

But even then the blank value is not selected if I leave the page but the other 2 values which I have mentioned in 'Toggle Select' trigger is selected.

Now I would like to select the 2 values along with the blank value when I leave the page.

Kindly help.

Thanks & Regards,

Vinitha Mano R.

Not applicable

Re: To Select Blank Value Using Trigger

Can you attach a sample because I don't know the 2 values you are trying to select when you leave the page.

Not applicable

Re: To Select Blank Value Using Trigger

find below an example where I could select two values along with the blank

("b"|"f"|"")

Try it after changing your intended values

Not applicable

Re: Re: To Select Blank Value Using Trigger

Hi,

I have attached the sample.

Kindly help.

Thanks & Regards,

Vinitha Mano R.

Not applicable

Re: Re: Re: To Select Blank Value Using Trigger

Thanks for the sample.

Please check the triggers in sheet properties onActivateSheet for the selection when entering the sheet and OnLeaveSheet for the selection when leaving the sheet.

Regards,

Sajeevan

Not applicable

Re: Re: To Select Blank Value Using Trigger

Hi,

Thank you for your help. It works fine.

Thanks & Regards,

Vinitha Mano R.

Community Browser