[Doc Merge] - Library of Errors

Hi all,

I have been using docmerge for the last few days and come across a bunch of errors which im not finding overly helpful. I was wondering if anyone/sugar had compiled a list with troubleshooting steps?

a few:

malformed table

{insert field name} is not defined

Also, don't seem to be able to use IF conditions in excel templates.

Parents
  • Hi Ross. Sorry to hear you're having trouble using Doc Merge! We will work on making the Doc Merge errors more meaningful and providing more documentation to help you troubleshoot. Thanks for the tip!

    In the meantime, here is some technical meaning behind the errors you encountered (which you may or may not care about) and some suggestions for troubleshooting:

    • Malformed table: This is a parser error and means that the parser was unable to create readable xml tags. We suggest manually recreating the table and making sure the collection tags (e.g., {#calls} ... {/calls}) are in the proper cells. Start with a simple table and then build up complexity.
    • {insert field name} is not defined: This is a metadata error and it might mean that your metadata is out of date or that the tag is incorrect. Please recheck the field name that you are using is correct.
    • Unexpected identifier: This might mean that the field name is wrong. Please check your syntax.

    Right now conditionals in Doc Merge only work with Microsoft Word. We are looking into expanding this capability to Excel in the future. 

    You may find the help article on Sample Doc Merge Templates to be helpful to see how an example Excel template is set up, for example.

    Let us know if we can provide any more help!

    Lydia Manger

    Product Manager — Sugar Discover

  • Thanks for this Lydia. Very helpful. I do have one further query, if you don't mind answering? It is regarding looping over product bundles when producing a quote doc. I want to filter by the name of the bundle but cannot seem to get it to work. Am i being dumb?? the below works but shows me all of the bundles

    -----

    {#product_bundles}

    {if product_bundle_items.name==”Additional Items”}

    {name}

      

     

    Additional Items

     

     

    {#products}{name}

    {quantity} No

    {discount_price} Each

    {subtotal} Total {/products}


    {/product_bundles}

     -----

  • Thanks for the follow up question, Ross. I'm sorry it took a few days to return to this. I think I have a solution for you (if I understand your case correctly)! See the attached image to see what I saw in Sugar (a group of items with the name "Additional Items"), what I saw in Word, and then what I saw in the merged doc. Note that I also got an "Error: Invalid or unexpected token" message (I agree, we need to update it!). All I did was change the quotation marks around "Additional Items" in word to use the Unicode character 0022 (go to Insert > Advanced Symbol and find the "). I know there are various pieces of software where smart quotations do not work well, and I am guessing that is what the issue is here (or something similar). Please try replacing any quotation marks with unicode characters to ensure that there is no secret formatting getting passed. 

     

    I notice in your post above that you used "if product_bundle_items.name...." and I wonder where you got that syntax from. Luckily the others were able to give you the tip that you only need to use "name". I thought I'd point out something that you may not have noticed (I didn't notice it at first either!). In the Doc Merge Template Assistant, once you choose a module and then a related module click the gear icon to the right of the related module. You can then click into the Fields field and select the field you want to pull from Product Bundles (in this case, name) and see the syntax with the proper formatting. In your case you then used the filter "if", but this may help you get to the correct syntax for the field names. 

    I hope this helps get you to where you need to go! Please let us know if you need anything else!

    Lydia Manger

    Product Manager — Sugar Discover

  • Hi Lydia, got another one, sorry - Unexpected end of input. what does this mean?

  • This one means that image merging failed. To troubleshoot:

    • Try downloading the image. If the image fails to download, then there's a server issue or maybe the image was deleted from the server and it doesn't exist.
    • If the image downloads, check the size. If it is a few hundred MB, it may be too big to merge. You couldn't try compressing images. 
    • It could also mean failed data parsing, so you should double-check your syntax. There may also be some data requests that are failing in Doc Merge so that you are not getting data from the Sugar server (mostly an issue if you are an on-premise customer).

    I hope that helps! 

    Lydia Manger

    Product Manager — Sugar Discover

Reply
  • This one means that image merging failed. To troubleshoot:

    • Try downloading the image. If the image fails to download, then there's a server issue or maybe the image was deleted from the server and it doesn't exist.
    • If the image downloads, check the size. If it is a few hundred MB, it may be too big to merge. You couldn't try compressing images. 
    • It could also mean failed data parsing, so you should double-check your syntax. There may also be some data requests that are failing in Doc Merge so that you are not getting data from the Sugar server (mostly an issue if you are an on-premise customer).

    I hope that helps! 

    Lydia Manger

    Product Manager — Sugar Discover

Children
No Data