#GeneralInterest I have "user input task" activity and "document

#GeneralInterest 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-79029

OriginalPostID-79029

  Discussion posts and replies are publicly visible

  • Dhaval, you may create a docx template with a checkbox (you can insert checkbox symbol) and do a Save As "Word XML Document". This will save the document in an XML format and you will get the Word XML representation of the contents in your template.
  • Allright, i have created template file and also included checkbox but, how it could be check/uncheck from "document generation service" from applian.
  • Dhaval, here is an example:
    Create Word Docx template.
    Use the "Text Doc from Template" smart service under Document Generation in your model.
    Have a variable like ###wifiCheckbox### in your docx template.
    In the Template Configuration, you can put an if() condition for ###wifiCheckbox###
    For example:
    Find in template document -> ###wifiCheckbox###
    Replace with -> if(pv!isWifi, "<w:sym w:font="Wingdings 2" w:char="F052"/>", "<w:sym w:font="Wingdings 2" w:char="F0A3"/>")
  • Thanks, it works..
    Can you also tell me, how can i place image same way, i want to take image upload from user input form and place into generated report doc.
  • You can provide a link to the document uploaded using Appian.
  • Hi Omkar, I have used file upload control in form and set save folder and got stored document object into process variable. Now, In Document generator service, i have mapped "ParamImage" (###) parameter with that process variable and in generated document parameter got replace by "[Document:1810]" ..
    How can i get actual uploaded image instead of document object valuet ?
  • Also, one another query, not sure, its right place or have to raise another ticket..

    I have created a Complex data type (having fields - Item name,Price,Description.
    I want these fields to be input dynamic and populate into table as below:

    Need to achieve as below:
    1. User Input activity form- user can input multiple items for this complex data (Item name,price, description) dynamically like - "Add new item" link which would allow to input multiple values from from.
    2. All user input (number of complex data type rows) should be populate into the table existed in docx template.

    My table theme and format are fixed into docx template and i just want these user multiple input to populate into generated report.

    Is this possible to achieve in Appian form (for multiple input) and document service (to populate multiple data into table) ?
    Please share approach if we could achieve this.

    Thank You
  • Response to 1st comment: You cannot insert an image directly into the doc. But as I said earlier, you can provide a link to the uploaded image in your document. You can use linktodocument( document, text, [newWindow] ). Specify your document PV for the document parameter in that function.
  • Response to 2nd comment: Use the Grid element in your Appian form that would accept and save values in a Multiple CDT PV. To create a table from the CDT PV values, you need to deal with WORD XML tags like <w:tbl>, <w:tc> and <w:r>. Create a sample table in a docx and save it as Word XML. Then check how the table elements are structured in the XML. Using the "Text Doc from Template" smart service you can dynamically insert <w:tc> (column) and <w:r> (row) elements in your <w:tbl> (table); create rules that return the XML needed for adding a row/column. For example:
    ###itemTable### -> rule!getItemTable(pv!cdt)
    rule!getItemTable(pv!cdt) -> has rules like getTableHeader(), getTableRow(), getTableColumn()...
    rule!getTableRow() -> "<w:r><w:t>Item 001</w:t></w:r>"
  • For Comment1 (image populate): i have tried by using "linktodocument" function and provided document object pv and text . Now, generated template shows me error while opening the doc and it shows it can't open due error in document.xml - line 2 char 1218.
    I have just checked at document.xml and related text on error is as below
    - "Name: <a href="http://[appian URL]suite/doc/1873" target="fProcess">final</a>"
    can you suggest what i am missing here ? I have uploaded image file only and which is uploaded on given folder.
    Also, another thing, Is it possible to directly populate image instead of link ?
    Thank You.