Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've come across a function (??) called GetSelectCount in a script. What does it actually do ? The actual code is as follows:
=If(GetSelectCount($(SalesYear))=0,Year(Today()),MaxString($(SalesYear)))
What does it count ?
Thanks for your help
MV
Why do you think SalesYear is a variable ? It's a field name.
You've completely confused me again !
Can someone tell me.....does GetSelectedCount return a count or a value ?
Well, I haven't got the answer.
You are saying GetSelectedCount returns a value, whereas Tresesco is saying GetSelectedCount returns the number of field values selected. These are two different things and I'm still none the wiser.
Help !
Yes, Tresesco said right...
GetSelectedCount Return the "Number of Selected values" .
let say, if you are writing this expression in text object =GetSelectedCount(Year), and you have selected year 2011 and 2012, in this case ,it will return you "number of selected values in year field" and you will see "2" in the text box.
but what i tried to explain you ,that is use of GetSelectedCount in your expression, which is
=If(GetSelectCount($(SalesYear))=0,Year(Today()),MaxString($(SalesYear))),
here in the expression , GetSelectedCount will return result to your IF statement, and than if statement will return the final result that will be displayed in your object, that result will be Maximum Year.
so you need to understand if statement as well..
hope it help...
See the attached qvw to come out of confusion.
Right. I think there was a misunderstanding of language here. I became confused when you said, "No" !
Thank you to Tresesco for the correct solution to the original enquiry.
And thank you for explaining the meaning of the full script statement which includes the MaxString function.