Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Store the selection of a field in a variable for an alternate state

Hello!

Is there a way to store selection of a field in a variable but taking into account the alternate state?
I can get it in a text object but using the alternate state on the object properties but I cannot get it into a variable using either the object id or the alternate state

=if(GetSelectedCount(SCCUSTCDE)=1,SCCUSTCDE,Null())

This formula gives me the last selection made on any state, and I need one that only applies to a specific alternate state

Any help will be appreciated

Regards


Pablo

5 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Make sure that variable your using in the object also in the same state that you want achieve.because as of now getfieldselections returns the selections based on the state of the object where this function is used.

Not applicable
Author

I actually want to use the value of an alternate state to pass it on as a parameter to another state.
That's why I want to assign a variable, to get the value on the same state is not a problem
With expressions like sum you can tell which alternate state to look --> sum({State1)Sales) but this is not a numeric value so I need an alternative
Hope this clarifies
Regards,

CELAMBARASAN
Partner - Champion
Partner - Champion

You can assign it on button click have you checked it?

Not applicable
Author

I need to see when a selection is made on a particular alternate state and keep that value on a variable. But only the selections made on that alternate state, and have that value available in whole app

Not applicable
Author

Could you try to use Only(selectionField) as the definition of the variable to get what you want.