I have "user input task" activity and "document generator" s

I have "user input task" activity and "document generator" service where i map the ### parameters(defined in DOCX template) with appropriate process variables.
PROBLEM: I want checkbox field to populate in template field based on given input from "user input task form".
As found, it discussed/found , we could achieve this using OOXML and w:checkbox such elements.
But, How can i generate OOXML for given template and generate docx file having checkbox ?
any one please share me some detail step to achieve checkbox field to populate in report template ?
Thank You...

OriginalPostID-79028

OriginalPostID-79028

  Discussion posts and replies are publicly visible

  • I believe you had the same question in this thread. forum.appian.com/.../
    Did this not answer your question?

    You simply need to put a placeholder for where the checkbox needs to appear such as ###MY_CHECKBOX### and in the mapping for this value in Appian, you need to pass the OOXML (For e.g. <w:checkbox ... ... ...>

    Do remember to escape your XML characters in the data while mapping using toHtml()
  • Hi
    From your last answer, i got idea that, i have to use OOXML and pass parameter value as w:checkbox with value 0/1 and it allows to populate checkbox field.
    But, I have query, i don't know how to generate OOXML file, i do have only DOCX template file. can you please tell me which activity or service, i have to use to generate OOXML file from DOCX and use it OR example steps how i could get ooxml and pass param ?
    thank You
  • I have tried below but it did not work, can you please correct me for wrong step:
    1. template file - docx type contains below fields
    Phone:###checkboxfield1###
    Wifi:###checkbox field###

    Now, In process modulear, have used service "MS Word 2007 Doc from Template" and mapped parameter "checkboxfield1" with below value
    <w:checkBox>
    <w:size w:val="1"/>
    <w:default/>
    <w:checked/>
    </w:checkBox>"
    Now, generated report docx file contains below text instead of checkbox.
    <w:checkBox>
    <w:size w:val="1"/>
    <w:default/>
    <w:checked/>
    </w:checkBox>
    it appears same as how passed from report template.

    Can you please tell me which additional service i have to use for OOXML and steps to generate report having checkbox.
    Thank You
  • Dhaval, I should have been clear. This is the steps you need to follow.
    Rename your .docx file to .zip.
    Unzip your file
    You will get a folder and within /word dir, you will see document.xml
    This is the XML representation of your document.
    You will need to replace the tag in this document (you need to use Text document from Template for this) and then zip the content using the ZIP plugin available and rename the resulting doc to DOCX again.
    I would strongly recommend against this because the amount of IT maintenance overhead is quite a bit. For each change, you will have to manage the change in the template so it's not going to be easy.
  • Ok, i will replace checkbox's value attribute with ### parameter in text document and prepare docx file (how you said) and will associate with document generator service template.. will see and let you know.. Please reply here if any wrong understanding at my end..
  • it did not work.
    I got XML file through how you mentioned and in document.xml file, i have updated block as below:
    <w:sdt>
    <w:sdtPr>
    <w:id w:val="-1225917461"/>
    ###checkboxfinal###
    </w:sdtPr>
    <w:sdtContent>
    <w:r w:rsidR="00F82D0C">
    <w:rPr>
    <w:rFonts w:ascii="MS Gothic" w:eastAsia="MS Gothic" w:hint="eastAsia"/>
    </w:rPr>
    <w:t>?</w:t>
    </w:r>
    </w:sdtContent>
    </w:sdt>

    Now, when i do zip and rename back to DOCX and open that file then it shows me error and unable to open the file. it would be due to xml format issue.
    As you suggested, i think to replace this ###checkboxfinal### with process variable value which will be like (<w:checkBox>
    <w:size w:val="1"/>
    <w:default/>
    <w:checked/>
    </w:checkBox>)

    But, for now, unable to open that DOCX file so, i could not move forward.

    Can you please correct me where i am wrong ?

    Thank You
  • You don't need to do anything to the XML file. When you enter ###checkbox### in your word document, and then unzip, the document.xml will already contain that text called ###checkbox### in it.
    You simply need to upload all of the contents to Appian Document Management System. Use Text doc from template and point it to Document.XML and map the ###checkbox### to the value <w:checkbox .... from your process. When the process successfully updates the document, you then zip all the contents back and rename it to .docx