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

Values cyclic expression group

Hello all, I have a cuestion. How I can know the value selected in a cyclic expression group. For example I have a Cyclic Expression with 2 field (Ambassador and Country Client) I need to know what is selected by the users to see a pivot table.

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello Marco,

Use

=GetCurrentField(groupName)


View solution in original post

7 Replies
Miguel_Angel_Baeyens

Hello Marco,

Use

=GetCurrentField(groupName)


Not applicable
Author

it work..!! thank you Miguel ;). But I have a new cuestion. How I can assign a value to my group with a macro for example?

I tried this expression:

ActiveDocument.Fields("My Group").Select "Ambassador"

but this don't work... 😞

Miguel_Angel_Baeyens

Check here. It's something similar.

Not applicable
Author

mmm.. the example is not the same, because I looking for a instruction that allows me to select a value in a cyclic group predefined. For example I have a Cyclic Expression with 2 field (Ambassador and Country Client) and I need insert in a report a button that change the option. If the user selects Country Client (for example) when presses the button then change value of group by Ambassador and vice versa.

Miguel_Angel_Baeyens

Here you are my try:


sub set_group_field
set gp = ActiveDocument.GetGroup("GroupName")
do while gp.GetActiveField.Name <> "FieldName"
gp.Cycle 1
loop
end sub


You have to change manually "FieldName" for the fieldname you want your users check or use.

Not applicable
Author

Thnk you Miguel it was very good..!! finaly my macro was so :


set gp = ActiveDocument.GetGroup("Gr Customer")
if gp.GetActiveField.Name = "Ambassador" then
gp.Cycle 1
end if

thanks again for everything bye... Wink

koresaket
Contributor II
Contributor II

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