Skip to content

Tasks

Import InfoPath forms

Upload a Microsoft InfoPath form template (.xsn): each view becomes a UserTasks form, with its fields, repeating tables, rules, validation and formulas converted where they translate, and a report of everything else.

Last updated 5 min read Edit this page on GitHub
On this page

Microsoft InfoPath is retired, but many teams still run forms built with it. UserTasks reads an InfoPath form template (.xsn) and rebuilds it as UserTasks forms. Each view becomes a form. Rules, validation and formulas are converted where they translate. Everything that doesn't convert is listed in a report and kept as a turned-off rule with its original expression, so nothing is lost silently.

Import a form#

  1. Go to Build › Forms and select Import → InfoPath form (.xsn).
  2. Drag the .xsn onto the box, or click to browse. UserTasks analyses it. The file is only read, never stored.
  3. Check the review:
    • Views: each ticked view becomes a form called "Form — View". Untick views you don't need, such as print views.
    • Make: One form per view (the default), or Views as steps / Views as tabs to combine the views into one form (InfoPath Switch view rules then go to that step or tab).
    • The counts: fields, repeating tables, and how many rules, validations and formulas convert.
    • Preview: each form as it will look.
    • Full report: every item and what it became, which you can download as Markdown or JSON.
  4. Optionally:
    • change the form name, or add a tag (the forms are always tagged with the form name and infopath);
    • choose Create a data table for the submissions. This also makes a child table for each repeating table, and a draft workflow that saves each submission (review it, then publish).
    • choose Show in the Forms menu.
  5. Select Import, then Open in the designer.

You need forms.edit to import, plus data.create and workflows.create (or workflows.edit) for the data table option.

Importing again#

When you upload the same file again (matched by its file name), UserTasks offers to update the forms it made before. Each form gets a new version, and workflows pinned to an older version keep it. You can also create new forms instead.

What maps#

InfoPathUserTasks
Text boxText, or Number / Currency / Date / URL / Email from the field's data type and format
Rich text boxRich text (bold, italic, lists, links; sanitised)
Date picker, date and time pickerDate, Date & time
Time fieldText with an HH:MM pattern
Drop-down list, list box, combo boxSingle select with the options
Option buttonsSingle select shown as radio buttons
Multiple-selection list boxMulti-select shown as a list box
Bulleted, numbered or plain listText list (one entry per item, same markers)
HyperlinkURL (opens in a new tab)
Picture controlImage (upload or camera; a picture saved in the template becomes its default)
Picture placed in the view (a logo)Display image, stored with the form
Signature line, ink picture, digital signatureSignature (an electronic signature: drawn or typed, with the signer and time). Inside a repeating table: a signature column (each row signs its own cell); inside a repeating section: a Signature in every item
Check boxCheckbox (yes/no)
File attachmentAttachments
Person / group pickerPerson picker (several people)
Calculated value (expression box)Label with an expression, keeping its number, currency or percent format
ButtonButton, with its rules on Button clicked
Repeating tableList (editable table), a column for each control in the row; a repeating table inside it becomes a nested List (up to 3 levels)
Repeating sectionRepeating section: a card per item with the same controls and layout; nested sections nest (up to 3 levels)
Choice group (choice sections)Choice group: one of its sections shows, picked with a switch
Section, optional sectionSection, optional section
Layout tablesRows of up to 4 columns, in the same order
"Cannot be blank", non-blank data typesRequired
Schema patterns, ranges, lengthsPattern, min / max, min / max length
Default valuesDefaults (template.xml)
Default value with a formula (once)A Form loads rule that sets the value
Calculated default that updatesA Label with the expression, stored with the submission
Row arithmetic in a repeating tableA calculated column, e.g. quantity * unit_price
Conditional formatting: hideAlways rule: hide while the condition holds
Conditional formatting: read-only / disableAlways rule: read only (fields) or disable (buttons)
Conditional formatting: font colour, font size, font, shading, bold, italic, underline, strikethroughAlways rule with Set style (colours snap to the theme's tones and the report gives the original colour); in a repeating table, a List row style on that cell
Conditional formatting on a control in a repeating table: hide / disable, reading the rowA List cell rule: that row's cell is hidden (an empty cell; the column stays) or read only (the server keeps the saved value)
Conditional formatting hiding a repeating table's column (its header or control) on a form conditionAlways rule hiding the whole column (column:<list>.<column>): the header and every cell, the table closes up
Font size, font, colour, bold, italic, underline in the viewThe field's Text style (label and value) or the List column's (header and cells); fonts map to web-safe stacks (Calibri, Segoe UI, Arial, Verdana, Tahoma, Times New Roman, Georgia, Courier New) or, for any other font Google Fonts has (Open Sans, Lato, Roboto…), to that Google font — served from your own UserTasks site; the view's usual font and size are left to the theme
Data validation on a repeating fieldA List column validation (per row) or a rule on each Repeating section item
User roles, get-Role()Conditions on the person's workspace roles (user.roles contains "Supervisor")
Data validationAlways rule with a field error
Rules on a field / button / form load / submitField value changes, Button clicked, Form loads, Before submit
Rule: set a field's valueSet values, with {{= … }} formulas
Rule: show a messageShow a message
Rule: switch viewGo to step (with views as steps)
Rule: query a data connectionTable list, or Call an API reference, when a data table or API reference has the connection's name

XPath conditions and formulas are translated to UserTasks conditions and expression functions:

XPathUserTasks
=, !=, <, >, and, or, not()conditions (AND / OR groups)
. = "", string-length(x) > 0is empty, is not empty
contains, starts-withcontains, starts with
concat, sum, count, round, floor, ceiling, string-length, normalize-spaceCONCAT, SUM, COUNT, ROUND, ROUND_DOWN, ROUND_UP, LENGTH, NORMALIZE_SPACE
substring-before, substring-after, substring, translate, starts-withSUBSTRING_BEFORE, SUBSTRING_AFTER, MID, TRANSLATE (or UPPER / LOWER), STARTS_WITH
sum(rows[col = "x"]/amount), count(rows[col = "x"])SUMIF, COUNTIF over the List
xdMath:Eval(rows, "qty * price") in a sum / averageA calculated List column, summed
xdMath:Nz, Avg, Max, Min, xdUtil:ConcatCOALESCE, AVG, MAX, MIN, CONCAT
today(), now(), addDays()TODAY(), NOW(), ADD_DAYS()
+, -, *, div, mod+, -, *, /, MOD()
userName(), get-DisplayName() in a set-value rule{{user.email}}, {{user.name}}

What doesn't convert#

Each of these is listed in the report. Behaviour is kept as a turned-off rule whose Notes hold the original XPath, so you can finish it in the Rules tab.

  • Data connections (SharePoint lists, web services, databases, XML files). Create a data table or an integration with the same name and import again: query rules then use it, and drop-downs fed by it get their options from the table. Until then those drop-downs are text fields.
  • Form code (script or managed code). It is never imported or run.
  • Certificates. Digital signatures become electronic signatures; certificates aren't carried over.
  • Fonts that are neither web-safe nor on Google Fonts (Wingdings, licensed corporate fonts) fall back to the theme's font; the report names them.
  • A few XPath forms: position() / last() in formulas, predicates other than one = comparison, xdMath:Eval outside a sum or average, and reads of secondary data sources (GetDOM).
  • Nesting deeper than 3 levels.
  • Rules that convert in part. The actions that translate run; the report marks the rule in part and its notes say what is left.
  • Person fields on a public form. Anonymous visitors on a public link don't see Person fields (there is no one to look up), so give a public form a text or email field instead.

Limits#

  • .xsn files up to 4 MB in the app (the request body limit of hosted serverless platforms is about 4.5 MB). With the REST API or the CLI on a self-hosted instance, files up to 20 MB are accepted (INFOPATH_MAX_MB).
  • Large templates: images make most .xsn files big. In InfoPath Designer, use File → Publish → Export Source Files, zip the folder (you can leave out the images) and upload the .zip.
  • Compression: InfoPath saves with MSZIP, which is supported. A template re-packed with LZX compression is refused with a message: save it again from InfoPath Designer, or upload the zipped source files.
  • At most 200 fields and 100 rules per form, and 40 views per file. If a view needs more rules, the report lists those left out.
  • Files are checked before they are read: at most 1,000 files and 96 MB unpacked, with no external entities or DTDs in the XML, and a time limit.

Tips#

  • Import the default view first, and untick print-only and admin views.
  • Use views as steps when the views are stages of one process, such as a request and an approval.
  • Check the report's Needs attention items, then open each form's Rules tab. Turned-off rules start with the InfoPath rule name, and their notes say what is left to do.
  • Turn on Create a data table to keep submissions the way an InfoPath form library did. Then publish the draft workflow.

API, MCP, CLI and the Agent#

  • REST: POST /api/v1/forms/import/infopath with file_base64 (or multipart file), file_name, and options mode, views, name, tag, existing (new / update), create_table, available_in_menu. dry_run: true returns the report and the forms it would make, and stores nothing.
  • MCP: forms_import_infopath, with the same arguments.
  • CLI: usertasks forms import-infopath --set file_base64=@@Expense.xsn --set file_name=Expense.xsn --set dry_run:=true. @@ reads a file as base64.
  • Agent: attach an .xsn in the Agent panel. The Agent reads the analysis and can explain what converts. Import this InfoPath form imports it after you confirm.

InfoPath list forms on SharePoint Server#

With the SharePoint extension, an InfoPath form that served as a SharePoint list's form can be imported straight from the connected site, and the imported form then becomes the list's New, Edit and Display form, opening inside the SharePoint page. InfoPath's original form addresses are kept, so switching back is one explicit click. See SharePoint list forms.

Was this page helpful?