Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select In Field function to activate a variable

Hi All

I am trying to activate a variable by selecting a dimension in a straight table

Is this possible?

Regards

1 Solution

Accepted Solutions
tresesco
MVP
MVP

If you want to select a value from a field and get that value in a variable, you have to just define your variable like:

vVariable=FieldName

View solution in original post

5 Replies
tresesco
MVP
MVP

If you want to select a value from a field and get that value in a variable, you have to just define your variable like:

vVariable=FieldName

its_anandrjs

Hi,

On selection of the dimension in straight table if you need to fetch the selection then use in a variable.

vSelectionvar = GetFieldSelections(Here Your Dimension Field Name)

Ex:-

vSelectionvar = GetFieldSelections(Product)

Or

vSelectionvar = GetFieldSelections(Year)

Regards

Anand

rahulgupta
Partner - Creator III
Partner - Creator III

Hi Kevin,

I have made the same requirement available in my recent project.

Requirement: A Straight Table contains say Product as Dimension & Sum(Sales) as Expression. User wants on the selection of any Product in  the Straight Table an alert on the Right Top Corner.

Resolution: In text object, we put the expression as "=If(GetPossibleCount(Product)>0, Red(), Green())". This turns the text object to Green when nothing is selected and to Red when any one selection is made Straight Table.

Hope this helps.

Regards

Rahul

tresesco
MVP
MVP

Hi Rahul,

I guess you meant to use GetSelectedCount(), right? Otherwise, if you select or not GetPossibleCount() would always return value >0 (excluding a case when you select all and then do an inverse selection 'Select exclude').

Not applicable
Author

Thank you. Got it working