2 Replies Latest reply: Jan 29, 2014 9:03 AM by 927283 RSS

    FDM load import based on non loading member

    927283

      Hi,

      I am importing a file into FDM for Planning. The dimension activity is based on 2 (non loading) columns in the load file. e.g.

      Column F ABCDE

      Column G 712001

      Column H 96780001

       

      If the number in Column G starts with a '7', then the dimension Activity is (Column F + Last 3 numbers of Column H) i.e ABCDE001). If the COlumn G does not start with 7, the Activity is to be populated the same as Column F. I could possibly have Activity being mapped to Column F in Import Format butmy question is how do i get COlumn G and COlumn H into FDM.These columns are not required for loads and only for determining the Activity dimension load.

        • 1. Re: FDM load import based on non loading member
          Mike_Lau

          You can create an import script and assign it to the Activity dimension in your Import Format.  The import script should look something like:

           

          Function Get_Activity(strField, strRecord)

           

          iTotalNumberOfColumns = 8  'Total number of columns in load file

          iColumnF =6  'column number for Column F

          iColumnG =7  'column number for Column G

          iColumnH =8  'column number for Column H

          strFileDelimiter = ","  'File Delimiter

           

          strColumnF = DW.Utilities.fParseString(strRecord, iTotalNumberOfColumns, iColumnF, strFileDelimiter )

          strColumnG = DW.Utilities.fParseString(strRecord, iTotalNumberOfColumns, iColumnG, strFileDelimiter )

          strColumnH = DW.Utilities.fParseString(strRecord, iTotalNumberOfColumns, iColumnH, strFileDelimiter )

           

          If Left(strColumnG,1) = "7" Then

               Get_Activity = strColumnF & Right(strColumnH,3)

          Else

               Get_Activity = strColumnF

          End If

           

          End Function

          • 2. Re: FDM load import based on non loading member
            927283

            Thanks. this worked. Appreciate your help