Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Only()

can any one tell me the usage of only() function??????

where can i use it????????

5 Replies
Not applicable
Author

Hi,

I'm using only for a selection box. I didn't want the user can select more than one field. If he does it; the selection box won't select anything.

Exemple:

I have a selection box using my field %SERVICE. so it display me all the services and the user can select one or more services. Now, i'm going in the menu Parameter-->Propriety of the document. In the Triggers, in the middle: "Event field triggers" I will select my field %SERVICE and push on the button "In case of selection" something like that (sorry i don't have an english qlikview). So I will add an action: "Selection in the field", it's when the selection is made. There is 2 fields to complete: Field and Search In. In field of course you will write your field: %SERVICE and in Search in: here for limit the selection to one, you will write the expression: =Only(%SERVICE)

I used it for this,  hope it helped you to understand how you can use it for your problem

erichshiino
Partner - Master
Partner - Master

In many cases, only() will have the same result of =%SERVICE

The advantage of only() is the possibility of set analysis. For instance, you can write only( {1} %SERVICE) to ignore selections, use alternate states and so on.

Regards,

Erich

perumal_41
Partner - Specialist II
Partner - Specialist II

Hi,

Try this expression ,this one help for ur problem

Aggr(Only(%SERVICE) ,%SERVICE)

Not applicable
Author

Hi ,

   Thanks for your quick response.

Regards,

Ashok

Not applicable
Author

Hi Erich,

   Thanks for your quick response.

Regards,

Ashok