Auto generate file names and publish? - InfoPath Dev
in

InfoPath Dev

Auto generate file names and publish?

Last post 10-13-2010 09:36 AM by Ted Fitch. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-12-2010 06:06 AM

    Auto generate file names and publish?

    Hi all

    I am a total newbie with InfoPath, who has managed to design a web enabled form which actually works, and need a little help with 2 challenges that I have.

    I want to get approval comments in the InfoPath form when it is approved. Is that somehow possible? 

    The name of my form is auto generated at submit, but I need to add a counter at the end to it. I.e. "File name 1", "File name 2"... "File name 40".  The File name I get from a column in a SharePoint list,  and I need to get that counter value from a field in a SharePoint list as well. My problem is that I can not get the field nr value to increment when forms are created.

    I have googled a lot, and found that people use Count() and Max() functions to count the rows in their libraries, and then increment the number, but I need to get that value from a SharePoint list field. If the administrator changes the field value to 40, the next document name will be "File name 41".

    Any ideas how that can be acheived?

    Can file name be set in a field in InfoPath?

    Regards

  • 10-13-2010 09:36 AM In reply to

    Re: Auto generate file names and publish?

    Hi,

    Welcome to InfoPath!

    Regarding your approval comments - I assume you are referring to the approval comments in SharePoint?  You are using SharePoint workflow and you want those approval comments to come back into the form?  If that is the case you are going to need the fields from SharePoint into your form and then query the SharePoint document library for that form and pull in the comments.  You should be able to do this by following this how-to: http://www.infopathdev.com/blogs/agni/archive/2006/05/15/Query-for-Items-in-SharePoint-Form-Library-Using-GetListItems-Web-Method.aspx

    Regarding a unqiue number what we often suggest is to get the actual SharePoint ID from the document library that is created when the form is saved the first time.  This requires a double submit via rules in your form (you basically save the form once, query to get the SharePoint unique ID and then add that ID to the form and save back to SharePoint). 

    Since you are new to InfoPath you might also want to look at some of our tools - for example our qRules tool (http://www.qdabra.com/en/products/qRules.aspx) is a great time saver allowing you to accomplish complex InfoPath functionality that often requires code.  With qRules you don't need to know the code, you just use rules in InfoPath to call the code.

    Hope that helps and good luck!

    Ted

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