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

Can anyone give me an example of getselectedCount() function

What is the use of getselectedcount() function? can anyone give me an example?

7 Replies
robert_mika
Master III
Master III

From Help:

getnotselectedcount ( FieldName [, IncludeExcluded])

Returns the current number of not-selected values in a field in a field with AND-Mode in List Boxes (red values in list box).

If IncludeExcluded is true the count will include selected values, which are currently excluded by selections in other fields. If false or omitted these values will not be included.

Examples

getnotselectedcount ( Year ) 

getnotselectedcount (Year,true())

Peter_Cammaert
Partner - Champion III
Partner - Champion III

In order to hide an object when more than one dimension value is selected, add this to the Conditional Show expression box:

getselectedcount(CustomerName) = 1

Can be used for displaying a phone number to call in a large font in a text box, whenever you select a single customer in a list box or in a table.

BTW use getpossiblecount() if you want to show information whenever a single field value is indirectly selected (through association)

anbu1984
Master III
Master III

Check this

ananyaghosh
Creator III
Creator III
Author

As I am using QlikView personal edition.Please give me the code for it.

ananyaghosh
Creator III
Creator III
Author

You mean you have to use getselectedcount at front end rather than use in script?

can give me an screen shot of how to use it?

anbu1984
Master III
Master III

Load * Inline [

billing,payment

tenders,100

dues section,200

aaa,50

bbb,60 ];

Text box expr

='Selected count: '&GetSelectedCount(billing)

Getselcnt.png

sudeepkm
Specialist III
Specialist III

one scenario could be like below.

Assume that you have a field Region and you want to display the data in a table box when end user selects at least one Region. then you can use the getselectedcount(Region) condition to display the data in the table box like below.

T157696_1.png

Go to the Table box properties and add condition as getSelectedCount(Region)>0 that means whenever at least one value in the field Region is selected then the chart/table will display data.

T157696_2.png

now if you select one or more value in the Region field then the data becomes visible in the table.

T157696_3.png