4 Replies Latest reply: May 29, 2014 8:39 AM by Elerian Kumpler RSS

    Variables in an Array

      last weekend I was tired of the intensive use of variables for expressions, dimensions, comments and tiles in my charts so I was thinking about how to reduce them. I finally tried something warea storing the values in arrays and using subfield() commands in the charts to select the proper variable. The idea was as follows.

       

      definition of the variable:

       

      SET vSales = ('Total Sales';'Sales';sum(sales);'total sales per...')

       

      in the charts I would then use a subfield command for selecting the proper content:

       

      subfiled($(vSales),';',1) for title

      subfiled($(vSales),';',2) for expr text

      subfiled($(vSales),';',3) for expr formula

      subfiled($(vSales),';',4) for expr comment


      what am I doing wrong here? ESpecially the formula does not work.