5 Replies Latest reply: Sep 26, 2012 9:52 AM by Gregorio Zerpa RSS

    Represent Values Returned Differently

      Data returned through a query is a code, I want to change the value returned into someting meaningful for the users e,g, value retuned = CUSTOMORDCRE this I would like to present as Invoiced Value, there are four values I want to represent differently, how to I achive this.  I have tried using if but this ony appears to work for one value.


      CUSTCOLDEB = 'Invoiced Value'

      CUSTCOMMCRE = 'Commision Credit'

      CUSTORDCRE = 'Customer Order Credit No RMA'

      CUSTORDDEB = 'Customer Credit RMA'

        • Re: Represent Values Returned Differently
          Jonathan Dienst



          I would use a mapping table like this (assuming the code values are in field Code, and the result should be in field Name - change as required for your data):



          Mapping LOAD * Inline


                    Code, Name

                    CUSTCOLDEB, Invoiced Value

                    CUSTCOMMCRE, Commision Credit

                    CUSTORDCRE, Customer Order Credit No RMA

                    CUSTORDDEB, Customer Credit RMA




          LOAD ...



                    ApplyMap('MapNames', Code) As Name,


          FROM ...


          In a working app, you might build the mapping table from a database or spreadsheet source, rather than hardcoded as an inline source.


          Hope that helps