Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Only()

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

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

5 Replies
Not applicable

Re: Only()

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

erich_shiino
Honored Contributor

Re: Only()

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
Valued Contributor II

Re: Only()

Hi,

Try this expression ,this one help for ur problem

Aggr(Only(%SERVICE) ,%SERVICE)

Not applicable

Re: Only()

Hi ,

   Thanks for your quick response.

Regards,

Ashok

Not applicable

Re: Only()

Hi Erich,

   Thanks for your quick response.

Regards,

Ashok

Community Browser