Auto-generate ordered number list in text box - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Auto-generate ordered number list in text box

Last post 11-11-2014 08:16 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-11-2014 01:42 PM

    Auto-generate ordered number list in text box

    I am brand new to InfoPath and am in need of some non-coding help. I have a previously created form in which my manager wants a number or code (ex: ODN-01) automatically generated in a text box in the form. The text box in question is only shown when a certain "work type" is selected from a previous drop down box. The Infopath form is then used in Sharepoint to be accessed by multiple users.
  • 11-11-2014 08:16 PM In reply to

    Re: Auto-generate ordered number list in text box

    This is pretty easy to do using the SharePoint list id and a double submit.

    You will need the following:

    • Field in your main data source called "key" that is promoted
    • Submit data connection to your form library
    • Retrieve data connection to the same form library with the "key" column checked

    Add a rule to do the following when a button is clicked (or some other event):

    • Add an action that sets your "key" field using the function concat(now()," - ", userName())

    Add a condition to only do this once if the field is blank

    Add another rule to get the SharePoint ID:

    • Add an action that submits your form to your SharePoint library
    • Add an action that sets the "key" field under the Retrieve data connection's query section
    • Add an action that queries the library
    • Add an action that sets the ID field based on the ID for the returned record.
    • Add an action that submits it to the SharePoint library again

    There you have it. 

     

    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.