Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to switch cyclic group when I press on button?

Hi guys,

I have a button and graph with cyclic group field in the X axe.

I want to acheive the next result:

When I press on button the cyclic group will be changed from Day to Month.

How can I do it?

Thanks,

Nimrod

1 Solution

Accepted Solutions
boorgura
Specialist
Specialist

hey,

you can achieve that using a macro. (Not sure if you intend to do so)

sample code:

set group = ActiveDocument.GetGroup("CyclicGroupNamel")
set gp = group.GetProperties
gp.FieldDefs(0).Name="FieldName"
group.SetProperties gp
group.Cycle 2

Let me know if you have any questions.

View solution in original post

7 Replies
Not applicable
Author

I think this might help:

http://community.qlik.com/forums/t/17380.aspx

Not applicable
Author

No, I need the opposite. 🙂

When I press on the button it will switch the cyclic group field.

boorgura
Specialist
Specialist

hey,

you can achieve that using a macro. (Not sure if you intend to do so)

sample code:

set group = ActiveDocument.GetGroup("CyclicGroupNamel")
set gp = group.GetProperties
gp.FieldDefs(0).Name="FieldName"
group.SetProperties gp
group.Cycle 2

Let me know if you have any questions.

Not applicable
Author

Thanks for your response. it's working but pay attention that your macro is deleting all the options of the cyclic group field.

Not applicable
Author

I need to apply the same functionality on drill down group. Please suggest me some solution.

Not applicable
Author

Does this solution also work for the ajax client?

koresaket
Contributor II
Contributor II

I need to apply the same functionality on drill down group. Please suggest me some solution.