Most preferred auto-increment field method? - InfoPath Dev
in

InfoPath Dev

Most preferred auto-increment field method?

Last post 03-17-2013 12:38 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-14-2013 11:07 AM

    Most preferred auto-increment field method?

    Hi,

    I'd like to ask what would be the best method to apply an auto-increment field?

    I've currently manage to set the RefNumber field to contain only 5 digits with all 0s covering all digits based on the length of the ItemID of the second custom list (e.g. 00001, 00010, 00120, etc).

    1st Method
    What I'm first trying now is to have a second custom list to copy the most recent/highest Item ID from and whenever a new form is submitted, a list workflow will pick up and update the second list, creating an entry just to create the next item ID to copy from.

    For some reason, the workflow doesn't want to create an entry. Are there some cases where infopath customized forms do not work well with Sharepoint Workflows?

    2nd Method
    The idea is to have an xml file have the values of the ID and RefNumber. But I don't know much yet about XMLs so this is probably a no go for me.

    If anyone has an easier method for auto-increment without coding (I'm not allowed to heavily code), I'd love to hear it. Thank You.

    Filed under:
  • 03-17-2013 12:38 PM In reply to

    Re: Most preferred auto-increment field method?

    Hi Kamishiro-san and thanks for posting.

    I recently replied to another poster on the same topic: http://www.infopathdev.com/forums/p/25273/87867.aspx#87867

    The problem you will have with Method #1 is contention when two users submit simultaneously. I talk about this in the post referenced above. Best practice is to use a double submit.

    To get the format, just use something like: concat(substring("00000",5-length(field1)),field1), for your default value where field1 is the ref. You'll want to use this default value on a separate field or as part of a rule.

    もうちょいがんばってね。

    Patrick

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.