InfoPath File Attachment control and File Not Found error.

InfoPath forms have a default control for attaching/uploading files, called File Attachment. You can find it on the Design Tasks pane (View –> Design Tasks), under Controls within the File and Picture section. You can easily drag and drop the control unto your form in design mode.

file01

InfoPath team blog has a post on this, which also explains the blocked file types (such as exe and bat).

Additional:

If you ever get a “File not found” error attaching or uploading files there is a wonderful post here by SaurabhKV. I resolved this issue by adding a tiny bit of JavaScript (see below) as per-SaurabhKV’s post into a hidden CEWP at the bottom of the page in where the form resides. Hope this helps.

<script type="text/javascript">
aspnetForm.encoding = "multipart/form-data";
</script>


InfoPath “Error Processing Form” error

Kept getting  this error last week after an InfoPath form had been updated. This happened every time I tried  to open up (create) the published form from the form library.  In Design mode I looked through all the fields and controls again, assuming I’ve made a mistake, but no mistakes were made.

There was however, something that was staring me in the face, which I hadn’t realised. I had actually changed a “Pull-Down Menu” control to a “Free-Text Box” control within the form. Initially, the pull-down menu control was set to use lookup values that were stored on a SharePoint list, and a data connection was configured for this.

Now that the control is free-text, there was no reason for the lookup values to be reference in the form. I removed the particular data connection, and republished the form, needles to say no more annoying Form Processing errors. Lesson learnt? Always check for stray connections, controls, reference etc etc…


Auto-numbering within an InfoPath repeating table.

It’s quite easy setting up a column within an InfoPath repeating table to auto-number. Please see the list of steps to get this done listed below:

1) Double-click the intended column to get into it’s properties.

2) On the Data tab, under Default Value click on the fx (formula) button.

3) Within the Insert Formula box type this in Count(../preceding-sibling::*) + 1

4)  Click OK twice, and you’re done.

number

5) The above formula starts with 1. If for example 10 is used, then the numbering starts from 10.

Hope this helps.


Follow

Get every new post delivered to your Inbox.