Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Hello Marco,
Use
=GetCurrentField(groupName)
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... 😞
Check here. It's something similar.
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.
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.
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...
I need to apply the same functionality on drill down group. Please suggest me some solution.