Docmerge displaying if and else tags

Hiya, 

I am creating a docmerge template with a lot of if/else conditions using || for or and && for and conditions in it. I am testing in sections and have noticed that the if/else isnt working and the if and else tags are being left in the rendered document. Is there something wrong in the coding i have set up? or is this a bug? Screenshot below of the codeing on the left and result on the left.

Parents
  • Actually, my other issue is still relevent to this thread. same behavior, more simple as there are no elseif

    I have updated the formatting per the original answer. I have pasted an extract below as well as screenshot of the issue. 

    ***NOTE: Please ignore the fact the field names have lbl in them, im not accidentaly using the label reference***

    {#surv_survey_quotes_1}

    {if is_there_a_loft_c == "Yes" && lbl_loft_hatch_c == "No"}We were unable to gain access to the loft, due to there being no loft hatch.{endif}

    {if is_there_a_loft_c == "Yes" && lbl_loft_hatch_c == "No" && lbl_loft_accessed_c == "No"}We were unable to gain access to the loft during the time of the survey. {endif}

    {if is_there_a_loft_c == "Yes" && lbl_loft_hatch_c == "No" && lbl_loft_accessed_c == "No" && lbl_lost_space_c == "Yes"}During our survey it was noted that the loft is boarded. We may need to remove some of the boards in order to complete our installation and our quotation includes an additional hour of labour to cover these works.{endif}

    {if lbl_small_hatch_c == "Yes"}The loft hatch was not of sufficient size to enable us to carry out our proposals. We ask that you arrange for a larger opening to be provided. This opening needs to be at least 450mm by 500mm.{endif}

    {if lbl_airtight_loft_c == "Yes" && lbl_must_smell_c == "No"}There was very little air movement in the loft space. To ensure the optimum performance of the positive input ventilation system we would recommend cross-flow ventilation within the loft space. We recommend a qualified roofing contractor completes this work.{endif}

    {if lbl_airtight_loft_c == "No" && lbl_must_smell_c == "Yes"}There was a musty smell within the loft space. This could be because of a lack of cross- flow ventilation and we would recommend that a qualified roofing contractor investigates this. Good ventilation in the loft is essential to protect the roof trusses.{endif}

    {/surv_survey_quotes_1}

  • This syntax seems okay to me, and I also can't find any known issues around this behavior you're seeing where the conditional text ("if", "endif") appears in the merged document. We might be missing something, but I would also ask Support about this and see if there's further troubleshooting to be done.

    If you find out what the cause is, let us know so we can all learn. Slight smile

    Thanks and good luck!

    -Brenda

Reply Children
No Data