Text Doc from Template SS substitution keys

Certified Associate Developer

Above is what my substitution keys look like. Below is what I am seeing in the PM designer for each key. Some of the keys do appear normally. Below is for the key poss. I have keys which are not underlined that are producing the same behavior. This word document was provided to me by the client. It is a paper form that customers would fill out by hand.

p</w:t></w:r><w:r w:rsidR="00134D25"><w:rPr><w:rFonts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/>
<w:color w:val="000000" w:themeColor="text1"/><w:sz w:val="18"/><w:u w:val="single" w:color="221E1F"/>
</w:rPr><w:t>oss</w:t></w:r><w:r w:rsidR="00052BF8"><w:rPr><w:rFonts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/>
<w:color w:val="000000" w:themeColor="text1"/><w:sz w:val="18"/><w:u w:val="single" w:color="221E1F"/></w:rPr><w:t>

Any idea what the issue is? Can anyone reproduce this? I could send a portion of the document to anyone interested.

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

    I am not sure what you are looking for.

    In case your placeholders do not work, this is because the logic in Appian works on raw text that includes the XML formatting. To make it work, you have to make sure that a placeholder does NOT contain any formatting inside.

  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    Made original post to check my formatting. My post is now complete. I appreciate your responsiveness!

  • 0
    Certified Lead Developer
    in reply to khillizzy

    Cool! A riddle! Love that!

  • 0
    Certified Lead Developer

    There is a longstanding bug (since at least 10 years ago) in the Word Docx from Template smart service where Appian will "see" the replacement key name from the Word Template but will not filter out any background WordML markup language that has inadvertently been included "inside" the key name.  The worst offender for causing this is having Spell Check enabled in Word while making any additions / changes to a template, as each key is apparently bound to become cluttered with markup after such changes. 

    This becomes important when making updates to a template because even if the plaintext key name is unchanged, any change to the random junk WordML "inside" the key (which you can only see in "View Documentation" for the process model, iirc, and if you open the "word/document.xml" xml file from within the document's zip file), cause the new template version's existing replacement key(s) to NO LONGER MATCH, and will actually clear themsevles out when refreshed.

  • 0
    Certified Associate Developer
    in reply to Mike Schmitt

    Thank you so much for the detailed explanation! I got fed up with this issue and decided to use "PDF Doc From Template" instead. This worked fine except that the form fields were still editable in the output document. I started using the PDF Tools "Fill PDF" SS to solve this issue. I then realized I could also fill out the form with "Fill PDF". Currently tidying that up. The trickiest part was trying to find a free service for creating PDFs with form fields. I'm now on day 2 of my Adobe Pro free trial ;)

  • 0
    Certified Lead Developer
    in reply to khillizzy

    I love "Fill PDF", because if you have a big form with lots of complex substitutions, it's MUCH easier to handle it all in one expression rule than having to edit LOADS of INDIVIDUAL substitution expression boxes (UGH).  Plus it flattens the output (or at least has the option to).

  • It seems that the issue you are facing is a longstanding bug in the Word Docx from Template smart service in Appian. This bug causes the replacement key names to include background WordML markup language that should have been filtered out.

    One possible cause of this issue is having Spell Check enabled in Word while making changes to a template, which can result in cluttered markup within the replacement keys.

    To address this issue, you may need to manually remove the unwanted markup from the replacement keys in the Word document. Alternatively, you can try disabling Spell Check while making changes to the template to prevent the cluttering of markup in the replacement keys.

    Please note that this bug has been present for at least 10 years, so it may require a workaround or further investigation from the Appian support team to resolve it permanently.