Trap Successful but No Value

Altair Forum User
Altair Forum User
Altair Employee
edited July 2018 in Community Q&A

So I have an odd thing happening that I cannot seem to resolve: I have Monarch 15.0, and when I create traps for a set of invoices that are uploaded in a PDF format, I see my all of my trap types are successful.  However, one field has a total value for each line item, and although the trap shows it captured the data, no physical value displays when I attempt to review the table or export the final format.  I tried adjusting all of the input formats, i.e. switching between character, numeric, etc., but none of them recognize/display the value of the trap.  Any suggestions?

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2018

    PDF can be a bit tricky sometimes.  Can you explain what you mean when you see the trap types are successful?  Are you using Monarch Classic or Data Prep Studio?  If using Classic, are you seeing the fields being highlighted in report view and only one field is not being captured?  Or do you see the trap is successful in report design?  Has this model worked before or is it a brand new one?  If it has worked before, it may be possible the rendered PDF might have shifted a bit and either the entire trap line is being missed in a couple of places or just where the field is defined.  Did you try running report verify to check the boundaries?  Is this occurring on the detail template or an append or footer?

     

    Sorry for so many questions, but without more info, it is a bit of a guessing game.  Would it be possible to share the PDF file or does it contain confidential information?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2018

    PDF can be a bit tricky sometimes.  Can you explain what you mean when you see the trap types are successful?  Are you using Monarch Classic or Data Prep Studio?  If using Classic, are you seeing the fields being highlighted in report view and only one field is not being captured?  Or do you see the trap is successful in report design?  Has this model worked before or is it a brand new one?  If it has worked before, it may be possible the rendered PDF might have shifted a bit and either the entire trap line is being missed in a couple of places or just where the field is defined.  Did you try running report verify to check the boundaries?  Is this occurring on the detail template or an append or footer?

     

    Sorry for so many questions, but without more info, it is a bit of a guessing game.  Would it be possible to share the PDF file or does it contain confidential information?

    So I have the model designed in classic, but I also attempted to capture the field in DPS as well.  Unfortunately, both provide the same result of no value.  I have eight fields, two of which are calculated, but the other seven both capture the data in the trap and display their value.  However, this one field shows that it successfully trapped the information, i.e. the report view/designer window indicate the data is trapped with a highlight, but the field does not display the value that is trapped.  The other fields show both the item that was trapped and the value in the report and table views, respectively.  I did create this model recently, and I have not successfully applied it to any other reports.  I did run a report verify and no issues returned.  This issue involves an append template.  Due to privacy and security issues, I can only share pieces of the overall program and report, and I hope this small amount of additional insight will assist.  The report shows a "total due" amount, which i have renamed to "Item Total," as I aggregate these later into a summary view.  Once again, although not illustrated in the attachments, the other columns I have created return/display values that are indicated as trapped on the report view/designer window.Datawatch Value Capture Issue_Table View.JPGDatawatch Value Capture Issue_Trap View.JPG

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2018

    So I have the model designed in classic, but I also attempted to capture the field in DPS as well.  Unfortunately, both provide the same result of no value.  I have eight fields, two of which are calculated, but the other seven both capture the data in the trap and display their value.  However, this one field shows that it successfully trapped the information, i.e. the report view/designer window indicate the data is trapped with a highlight, but the field does not display the value that is trapped.  The other fields show both the item that was trapped and the value in the report and table views, respectively.  I did create this model recently, and I have not successfully applied it to any other reports.  I did run a report verify and no issues returned.  This issue involves an append template.  Due to privacy and security issues, I can only share pieces of the overall program and report, and I hope this small amount of additional insight will assist.  The report shows a "total due" amount, which i have renamed to "Item Total," as I aggregate these later into a summary view.  Once again, although not illustrated in the attachments, the other columns I have created return/display values that are indicated as trapped on the report view/designer window.Datawatch Value Capture Issue_Table View.JPGDatawatch Value Capture Issue_Trap View.JPG

    Since you are using an append template, the first thing that comes to mind is that there is no detail record for that field to attach to.  Is this the only field in that template?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2018

    Since you are using an append template, the first thing that comes to mind is that there is no detail record for that field to attach to.  Is this the only field in that template?

    No, it is one of many templates.  The detail template is working because the other six fields are being populated by their respective detail and append traps.  I also have exclusion traps to assist with pinpointing the data I want to extract, but I am not sure how much of a role that plays here.  The other two fields are calculated: one shows the location of the file and the other trims/splits this pathway to reveal just the file name.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2018

    No, it is one of many templates.  The detail template is working because the other six fields are being populated by their respective detail and append traps.  I also have exclusion traps to assist with pinpointing the data I want to extract, but I am not sure how much of a role that plays here.  The other two fields are calculated: one shows the location of the file and the other trims/splits this pathway to reveal just the file name.

    I would guess that missing field is being reported in a position BELOW the detail data if a normal invoice layout is present.

     

    Append templates are intended to be used for data ABOVE the detail records and most often for data that is common to several (or Many) detail records. For example the Invoice number and date (Append) that would be shared by all of the detail lines of an invoice.

     

    Have you tried changing the append template to a footer template? Footers are templates that apply BELOW the detail records.

     

    At the risk of causing some additional complication I would add that there are ways to force Appends to discover data fields that appear after the detail records but I doubt that should be necessary here.

     

    The original discovery using a much earlier version of Monarch (Classic) was useful at the time for certain complex "report" outputs since only one Footer template was allowed. However the combination of more footer templates being allowed and some general improvements in report layouts over the years seems to have reduced the need for the specialized requirement.

     

    HTH.

     

     

    Grant

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2018

    I would guess that missing field is being reported in a position BELOW the detail data if a normal invoice layout is present.

     

    Append templates are intended to be used for data ABOVE the detail records and most often for data that is common to several (or Many) detail records. For example the Invoice number and date (Append) that would be shared by all of the detail lines of an invoice.

     

    Have you tried changing the append template to a footer template? Footers are templates that apply BELOW the detail records.

     

    At the risk of causing some additional complication I would add that there are ways to force Appends to discover data fields that appear after the detail records but I doubt that should be necessary here.

     

    The original discovery using a much earlier version of Monarch (Classic) was useful at the time for certain complex "report" outputs since only one Footer template was allowed. However the combination of more footer templates being allowed and some general improvements in report layouts over the years seems to have reduced the need for the specialized requirement.

     

    HTH.

     

     

    Grant

    Hey Grant,

     

    That did it!  I appreciate the assistance and insight, and now I have new knowledge to use in order to create better traps/data capture for future reporting needs. 

     

    Thanks,

     

    David

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2018

    Hey Grant,

     

    That did it!  I appreciate the assistance and insight, and now I have new knowledge to use in order to create better traps/data capture for future reporting needs. 

     

    Thanks,

     

    David

    Hi David,

     

    You're welcome - I'm glad it helped.

     

    Just as an observation for future visitors that find this thread, a one off invoice in a PDF is a slightly special case that produces the blank append template field in this scenario.

     

    In a typical report  - or maybe a PDF collection of several invoices - the usual form of this "template type to position mismatch" would be to pick up the value but APPEND it to the next record,

     

    So your first invoice would look correct for selection (as you found) but would have no value in that field.

     

    The second and all subsequent records would have the value from the invoice before it. This is not always something that is easy to spot!.

     

    The last record extracted will appear to have its total extracted but will in fact have the total from the previous invoice.

     

    So you get a bunch of records that, at first glance, look fine except for the first one. In that situation it is easy to miss the source of the problem for quite a while when investigating especially if processing a lot of invoices with the same value or something very similar.

     

    If concerned about that (and with PDF files there an be other issues with formatting across multiple records that have been aggregated into a single file which can result in similar looking problems if you are really unlucky) it would be a good idea to put in some data quality checks.

     

    For example one can sum the values of the detail lines and then compare the result from the model to the total reported in the Invoice summary. That's just one obvious possible approach but there are likely to be many more depending on circumstances and the content of the file being analysed.

     

     

    HTH.

     

     

    Grant