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

Cycle Group

Hi

I want to create a dynamic Cycle group and set the Group as Cyclic .But I am not sure what I am missing in the below code.It throws me error at "gp.IsCyclic = true" .

Sub DymnamicGroup
ActiveDocument.RemoveGroup "Dimensions"
Set gr = ActiveDocument.CreateGroup("Dimensions")
gr.AddField "Age Range"
gr.AddField "Diagnosis Combo Desc"
gr.AddField "Diagnosis Desc"

set gp = ActiveDocument.GetGroup("Dimensions")
gp.IsCyclic = true

End Sub

Thanks

Priya

1 Solution

Accepted Solutions
Not applicable
Author

The below macro works.

Sub DymnamicGroup
ActiveDocument.RemoveGroup "Dimensions"
Set gr = ActiveDocument.CreateGroup("Dimensions")
gr.AddField "Age Range"
gr.AddField "Diagnosis Combo Desc"
gr.AddField "Diagnosis Desc"
gr.AddField "Payment Type"

set gp = ActiveDocument.GetGroup("Dimensions").GetProperties

gp.IsCyclic = true

ActiveDocument.GetGroup("Dimensions").SetProperties gp

ActiveDocument.GetApplication.Refresh

End Sub

View solution in original post

3 Replies
spsrk_84
Creator III
Creator III

Hi Priya,

I think what the macro u had written absolutely fine but i think the consition which u had given iscyclic =true i feel u would have given while creating the group itself, i am not sure check this one also

Sub DymnamicGroup
ActiveDocument.RemoveGroup "Dimensions"
Set gr = ActiveDocument.CreateGroup("Dimensions")
gr.AddField "Age Range"
gr.AddField "Diagnosis Combo Desc"
gr.AddField "Diagnosis Desc"

gr.IsCyclic = true

set gp = ActiveDocument.GetGroup("Dimensions")

Check like this ,meanwhile i will aslo try

Regards,

Ajay
End Sub

Not applicable
Author

Thank you Ajay

I will try and will let you know if it works.

Not applicable
Author

The below macro works.

Sub DymnamicGroup
ActiveDocument.RemoveGroup "Dimensions"
Set gr = ActiveDocument.CreateGroup("Dimensions")
gr.AddField "Age Range"
gr.AddField "Diagnosis Combo Desc"
gr.AddField "Diagnosis Desc"
gr.AddField "Payment Type"

set gp = ActiveDocument.GetGroup("Dimensions").GetProperties

gp.IsCyclic = true

ActiveDocument.GetGroup("Dimensions").SetProperties gp

ActiveDocument.GetApplication.Refresh

End Sub