5 Replies Latest reply: Feb 6, 2014 5:19 AM by Francisco Amores RSS

    Text filter in Account import script

    1010793

      Hi Experts,

      I am trying to filter text from the account codes while import data from TB. For e.g. my TB contains Total , Profit and Loss total, General Adminstration etc. I want to filter them and pass ignore rule.

      I have tried doing it but account column states "Require filed missing".

      Kindly help me with the correct steps.

       

      Function SkipText(strField, strRecord)
      '------------------------------------------------------------------
      'Oracle Hyperion FDM DataPump Import Script:
      '
      'Created By: admin
      'Date Created: 2/5/2014 1:56:28 PM
      '
      'Purpose:      
      '              
      '------------------------------------------------------------------
      'Dim Skiptext
      If (strcomp(strRecord,"",vbTextcompare)=0) Then

      'skiptext = (strRecord,1) < 0 Then
      Res.PblnSKip = True
      Else

      End If

      End Function

        • 1. Re: Text filter in Account import script
          SH

          You do not need an import script to do this. Simply map the source accounts you have identified (Total , Profit and Loss total, General Adminstration) to Ignore in your Account mappings

          • 2. Re: Text filter in Account import script
            Francisco Amores

            Hi,

             

            as SH said, you don't need import script for that.

             

            In any case, if your purpose is not to import them into FDM, your import script is missing return value in Else.

             

            if (strcomp(strRecord,"",vbTextcompare)=0) Then

            'skiptext = (strRecord,1) < 0 Then
            Res.PblnSKip = True
            Else

            SkipText = strField

            End If

            End Function

            • 3. Re: Text filter in Account import script
              1010793

              Hi SH

              I want to ignore these account right at the entry or at import stagte. Also they can be quite dynamic, therefore i dont want fix them in Maps.

              • 4. Re: Text filter in Account import script
                1010793

                Hi Mr. Amores

                I added the script but it has still picked up descriptions.

                Also to add in requirements, the description can also begin with special character such as opening bracket "(" along with any alphabetic code.

                I want to ignore them as well.

                 

                Awaiting ur reply

                • 5. Re: Text filter in Account import script
                  Francisco Amores

                  You would need to use strcomp in the correct way. In this line you are comparing the entire line being processed (strRecord) with empty string. So basically you are not doing anything.

                   

                  if (strcomp(strRecord,"",vbTextcompare)=0)


                  You have to find a pattern for the lines you want to skip and then implement it in your script.


                  For example, if all lines you want to skip begin with literal "Total:" you could do:


                  if UCase(Left(strRecord,6) = "TOTAL:" Then

                  Res.PblnSKip = True
                  Else

                  SkipText = strField

                  End If

                  End Function

                   

                  In your case where you want to compare Account codes, you will have to create an import script to skip desired lines and assign it to Account dimension in your import format.

                   

                  Currently your script is not correct.

                   

                  Regards