2 Replies Latest reply: Mar 24, 2011 7:00 PM by Steve Dark RSS

    Group name

    Gareth Joubert

      Hi

      The below brings back the field expression, however I would like to know if it is possible to get the heading of the active field in the group rather than the expression?

      GetCurrentField([Cus-Div-Subsp-Pdt-AM])

      (Group name is "Cus-Div-Subsp-Pdt-AM")

       

      Names are set in the circular group (Document Properties) but I would like to build this into a naming expression ie

      ='Top ' & vSlide &' '&GetCurrentField([Cus-Div-Subsp-Pdt-AM])& ' CM vs Bud'



      Thanks

      Gareth

        • Group name
          • Group name
            Steve Dark

            Hi Gareth,

            The quick answer is that you can not retrieve the label that you give an Expression in a cycle group.

            Typically the values in a cycle group are simply fields from the data model - and if these are named sensibly then GetCurrentField works fine. Often I will have a list of fields plus a 'No Grouping' option with an expression of =' '. I then display the caption as the following:

            ='Calculated Value' & if(mid(GetCurrentField([Cycle Group]), 1, 1) = '=', '', ' by ' & GetCurrentField([Cycle Group]))

            This works as long as you only have a single calculated dimension.

            If you have many calculated dimensions you could achieve the result you want by putting each expression into a variable and give the variable the name that you want to see. You can then use GetCurrentField but just strip out any characters from the variable name that you don't want.

            For example:

            ='Calculated Value by ' & replace(replace(replace(GetCurrentField([Cycle Group]), '=',''), '[', ''), ']', '')

            Hope that makes sense.

            Regards,
            Steve