4 Replies Latest reply: Apr 25, 2013 11:10 AM by Friedrich Hofmann RSS

    Make the Getcurrentselections function sort its return value

    Friedrich Hofmann

      Hi,

       

      in a textbox in my current document, I want to show the last selection (actually, I have a drilldown group as dimension and I want to display the level_I_just_came_down_from). The function works fine. It does not, however, display the selections in the order I make them - since the selections actually represent the process of drilling down into the data and I actually want to display only the next_level_up, not all the prior selections, the sorting order is very crucial.

      Can anybody lend me a hand here? What is the default sorting order of that function and how can I influence it?

       

      Thanks a lot!

      Best regards,

       

      DataNibbler

        • Re: Make the Getcurrentselections function sort its return value
          Fernando Suzuki

          Hi,

           

          I'm not sure if I understood what you need, but try this:

          =GetFieldSelections($(=pick(match(GetCurrentField([New Group]), 'Dim1', 'Dim2', 'Dim3'), '', 'Dim1', 'Dim2')))

           

          In the Match() content, replace the Dim1, Dim2, Dim3 with your Dimensions in the correct order.

          In the Pick() content, do the same, but consider that it must pair the Upper Dimension so the Lower dimension will not appear here.

           

           

          Attached a sample.

           

           

          Hope this helps you

          Fernando

            • Re: Make the Getcurrentselections function sort its return value
              Friedrich Hofmann

              Hi Fernando,

               

              yes, that example looks exactly like what I want. The textbox only displays the next-upper value from out of the drilldown group. I don't quite understand the syntax of your expression yet, but I'll try to redo it that way in my document.

              Thanks a lot!

              Best regards,

               

              DataNibbler

               

              P.S.: One more question rgd. this and a problem:

              - Problems first: I get an error in the expression when I enter the name of my group: The name is >Packbereich< - in the label_field in the >edit group< dialog, there is exactly that name, too.

              - A question: Once I have this working so far, can I expand it - and how - to encompass more levels (I will have five or six in the end, the very first (actually not part of the drilldown group) will be a date selection and then there will be four or five drilldown levels.

              Thanks a lot!

               

              P.P.S.: Ok, the problem is solved - don't ask me how, I changed it and changed it back and now it's seemingly the very same as before, but it works ;-)

              So only the question of expanding that syntax remains.