auto generate infopath forum number RRS feed

  • Question

  • I have cerated a custom list in SharePoint and edit it using Infopath 2013.Now, In this infopath form,I want a field which can auto generate a number whenever a user add a new item in this custom list. For eaxmple, the first item will have a auto gerenated field like 0001, the second is 0002.Can it possible to do that in Infopath? If yes, please tell me how to do it in details. Thanks.


    Wednesday, March 18, 2015 11:23 AM


  • Hi,

    Based on your description, you want to get some information about how to create an auto-number field using InfoPath 2013.

    The steps below about how to create an auto-number field for your reference:

    1. Create a custom list, named "Auto".
    2. Create a column in that list, type number, named "Auto No.".
    3. Click List -> Customize Form and edit default form in InfoPath.
    4. Click Data -> Data Connections -> Add in InfoPath.
    5. In "Data Connection Wizard", set New Connection to Receive Data -> SharePoint library or list -> set URL of my "Auto" list -> only select ID column  -> checked "Automatically retrieve data when form is opened".
    6. In InfoPath design view, right click "Auto No." text box -> Properties -> Default Value -> fX button -> Insert Function -> Math -> Max -> OK -> double clicke on the formula to select field -> Show advanced view -> in "Fields" drop-down choose secondary data source (named as my "Auto" list) -> select 'ID' node in 'dataFields' -> OK -> back in formula type '+ 1' (so the whole formula is like: 'max(ID) + 1').
    7. Choose title field -> click Manage Rules -> click New, choose action -> click Condition field -> choose ID, is blank, click ok -> click Add, choose set a field’s value -> in field, choose Auto No., in Value type 1 -> ok.
    8. Publish it to SharePoint list.

    Here are the links about the details of creating an auto-number field, would be helpful:




    Dean Wang

    Thursday, March 19, 2015 12:52 PM