itemID in infopath filename

Some­times you just need to make sure that the file­name of the infopath­form is unique when you save it to a library. One method to achieve this is to include the itemid in the file­name.

Here is how to do just that:

First you need to cre­ate a dat­a­con­nec­tion to the library where your infopath forms are saved. This is to aquire the itemID field.

Lat­eron we are going to deter­mine the last ID and add “1” to it.

Use this for­mu­la in the file­name­field:

concat("Formname - ";max(@Id) + 1)



Select the ID field in the above cre­at­ed dat­a­con­nec­tion.

Car­ry on!