- Right click on the input box in design mode and select "Expression Box Properties"
On the "General" tab, in the "Data Source" section, in the "XPath:" textbox, paste:
substring-before(substring-after(., "^"), "^")
- Open the XSN of the form in Design mode (right mouse click the file and choose design) and select File ? Extract form files from the menu to save the form as separate files. Then close infopath.
- You will now see a folder with the name of your duplicate form. Inside this folder you will see some files. Edit the FormEntry.xsd file with a text editor (wordpad or notepad) and find the line:
<xs:attribute name="id" type="xs:positiveInteger" fixed="n" use="required" />
- : where n is the id of the form.
- Change the n within <tt>fixed="n"</tt> to the form id of the form in the database with which you want to import the XSN(the new form id can be found by (a) examining the URL for the new form within OpenMRS' Admin ? Form screen, e.g. hovering over the "metadata" link for the new form and looking at the end of the URL in the browser's status bar at the bottom) OR (b) looking up the form table in the MySQL back end. Save and close FormEntry.xsd
- In the same folder, right-click on the Manifest.xsf file and selected Design.
- Choose File, Save As and save the form to disk with another name to get the second version of the modified form. You can delete the first version of the form. Upload the second version of the form into OpenMRS.
If your users are spending more than 15 minutes on a form, there is a possibility that their authenticated user session may time out. If this is the case, when the form is submitted, an undetected "403 Forbidden" error may occur and Infopath will close.
There are two global properties settings you can set to keep this from happening: formentry.infopath_taskpane_refresh_sec and formentry.infopath_taskpane_keepalive_min. The "refresh seconds" are "how often (in seconds) the taskpane should "ping" the server to keep the user's session alive". The "keepalive min" is "for how many minutes this should be repeated".