Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone!
I'm here this time because I've a list object of the months of the year & for a calculation (an expression in a table) I need to know how many months were selected of the list mentioned.
I tried to use the name of the field (Month) but it doesn't return me what I'm expecting.
Then, how can I know how many month were selected?? so far, I'm not interested in know wich months.
Thxs in advance!
Hi
Use GetSelectedCount(Month)
Andris
Hi Adris, thxs 4 answer.
I tried, but it returns -
I dont know if is because the field Month its a key field, could that be?
If you take a look at the example file called [Photo and Music], you'll notice that on the sheet Music there are several list boxes that have the count of selected items.
In this example, the function 'Count' is being used. So you can just write an expression like:
count(Distinct Month)
Now, if no selections are made, this will return the TOTAL number of distint items, when maybe what you want is zero. So, you can use an if statement that determines if something is selected or not:
if(isnull(GetFieldSelections(Month)),0,count(Distinct Month))
Hope this helps.
Mike.
Hi Mike,
I just did what you recommend me, and Thxs! It works..!
I'd tried count without distinct and descarted the idea!!
Thxs!
Thanks, GetSelectedCount worked good 🙂