Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
curiousfellow
Specialist
Specialist

Getselectedcount listbox with calculated values

I created a listbox with calculated values, this listbox is connected to an alternate state.

For a chart I want force that one item from that listbox is chosen.

How do I refer to this listbox in the function getselectedcount() ?

1 Solution

Accepted Solutions
sunny_talwar

Or this

Count({AS}DISTINCT if(Right(fieldname,2)=3, left(fieldname,4))) = 1

View solution in original post

6 Replies
Anil_Babu_Samineni

Not sure, I understand your rek. But, Normally it can be done like below

If(GetSelectedCount(FieldName) = 1, Only({AlterNateState<......>} FieldName1)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
curiousfellow
Specialist
Specialist
Author

The problem is that there is no fieldname, Because it is a calculated value.

For instance : if(Right(fieldname,2)=3, left(fieldname,4))

sunny_talwar

May be this

=GetSelectedCount(fieldname, False(), 'AS') = 1

sunny_talwar

Or this

Count({AS}DISTINCT if(Right(fieldname,2)=3, left(fieldname,4))) = 1

Anil_Babu_Samineni

Means,, You don't have Field using the same in script.. If so, Create one field in script for that and then use as i mentioned

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
curiousfellow
Specialist
Specialist
Author

Thank you. This works