1 Reply Latest reply on Apr 25, 2016 5:45 PM by Brad Shuel

    Find description in different field

    Luis Esturban

      Hi,

       

      I have a table with two fields (code, description), the field with a code has a mask with n levels, and I need find the description of all levels in a dynamic way.

       

      Example with two levels:

      CodeDescription
      01Level 01
      01.01description 01.01
      01.02description 01.02
      02Level 02
      02.01description 02.01
      02.02description 02.02

       

      The final result

      CF01 = Calculate Field 01 = Code in first level

      CF02 = Calculate Field 02 = Description first level

       

      CF01CF02CodeDescription
      01Level 0101Level 01
      01Level 0101.01description 01.01
      01Level 0101.02description 01.02
      02Level 0202Level 02
      02Level 0202.01description 02.01
      02Level 0202.02description 02.02

       

      My table has N levels with the next mask (##.##.###.#### = 01.01.001.0001) and I need the description in the dynamic way of the all levels (##, ##.##, ##,###.###, ##.##.###.####) in different calculate fields.  I can not use the function MID because the mask could change and the table have a lot of records with all levels.

       

      Thanks for your help.

       

      Luis

        • 1. Re: Find description in different field
          Brad Shuel

          Hi Luis,

           

          I think that this may be possible by doing a Custom Split. Please see the information below.

           

          1. Navigate to the Data Source Tab.

           

          2. On the field [Code] click the carrot on the header of the column. Select Custom Split

           

          3. The menu should appear. Enter a period as the separator and Split off all columns. Click Ok.

          Screenshot1.jpg

          4. The columns should now be split into different levels.

          Screenshot2.jpg

           

          Here is more information on Custom Splits.

           

          Split a Field into Multiple Fields

           

          I am a little unsure of how CFO2 is calculated, but an IF/Then statement could work.

           

          If [Code - Split 1] = "01" then "Level 01"

          ELSEIF [Code - Split 1] = "02" then "Level 02" END

           

          Hope this helps!

           

          - Brad