Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cyclic group selection

We have a cycle group which consists of Day, week, month, quarter, and year called g_DateSelection. This is setup as a dimension in a chart and working fine.  I would like to be able to use the selection of that cyclic group in a variable expression to perform another calculation.  For example, if on the chart, the user has selected the cyclic group and change it to display Week, can I write an expression outside this chart that will tell me that week versus day, month, etc is selected?  I tried GetCurrentFiled(g_DateSelection) but that doesn't work.  Any ideas?

1 Solution

Accepted Solutions
jerem1234
Specialist II
Specialist II

GetCurrentField(g_DateSelection) should work. Make sure you do not put single quotes around it. Just g_DateSelection (not 'g_DateSelection'). I think double quotes will work, "g_DateSelection", also. Try testing it out in a textbox and see what returns.

Hope this helps!

View solution in original post

3 Replies
jerem1234
Specialist II
Specialist II

GetCurrentField(g_DateSelection) should work. Make sure you do not put single quotes around it. Just g_DateSelection (not 'g_DateSelection'). I think double quotes will work, "g_DateSelection", also. Try testing it out in a textbox and see what returns.

Hope this helps!

Not applicable
Author

I was able to use the first suggestion to get the selection of the cyclic group and then I used that to write an expression based on what is currently selected from the cyclic group. Thanks!

Not applicable
Author

How did you get the current selection of the field selected in the cyclic group?