Keep a fields value - InfoPath Dev
in

InfoPath Dev

Keep a fields value

Last post 01-24-2012 02:56 PM by jaxkookie. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-24-2012 11:47 AM

    Keep a fields value

    I'm trying to find a way to use a sequential numbering system to name forms that are submitted to a forms library in SP 2010 (also Infopath 2010)

    The form naming convention will be OPxx where xx is a sequential number. 1 number higher than the previously submitted form.
    I created a field LastUsedNumber and when the form loads there are 2 rules
    LastUsedNumber = LastUsedNumber + 1
    FormNumber = concat("OP",LastUsedNumber)

    But of course each time the form loads LastUsedNumber is blank so FormNumber will always be OP1

    How can I persist this value somehow in this browser enabled form or do I need to look at storing it elsewhere?

  • 01-24-2012 02:56 PM In reply to

    This will not be an easy task unless you create a seconday table that stores and provides your numbering. The ID is perfect for this use, but this is unavailable until form is submitted. Now some will argue that you can create a data connection connection to the library and return the ID. this would allow you to do "max(@ID) +1. the only drawback from this method is 2 users could open a form at the same time having the same ID. 

    If the form does not need to be named in sequential order and get away with another naming convention, you can promote a field that can solve for your issue. This will allow you to retrieve the item ID from SP and concat its value to the promoted field.

    Kind regards,
    Larry
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.