Hello: I need your help with printing the SharePoint 2007 (form library) ID number in the form library's InfoPath 2007 form.
Goal: A user goes to the SharePoint 2007 form library, clicks to open a filled-out form that has been submitted to that library, and then clicks the Print icon in InfoPath to print a view of the form that contains the SharePoint form library (document) ID.
What I did:
1. I added the SharePoint document ID column to the default library View.
2. I added a Print view to the InfoPath Form containing a text box bound to the SharePoint document ID.
What it actually does:
The Print view in InfoPath does indeed display and print a SharePoint document ID, but not necessarily the one associated with that particular form. It prints the TOP-OF-THE-DEFAULT-VIEW ID in the form library. So, if the SharePoint default View sorts on ID descending, a user opens a new form from SharePoint, fills it out and submits it, closes it, then opens the form from SharePoint and prints it immediately, the ID is correct. Say it's number 273. But if three other forms are submitted in the meantime, and then the user goes back to print form 273, form 273 will display and print ID 276 -- the ID now at the top of the View due to its Sort configuration. If the View's Sort is changed to ID ascending, then form ID 273 will print ID 1, because 1 now appears at the top of the View.
What am I missing? I've got the feeling it's something obvious...
Other possibly important details:
Field name: ID
Data type: integer
No Validation or Rules are applied.
Text Box field, binding to Secondary data source
-
The form is not browser-enabled.
-
The form uses cascading fields that get their values from SharePoint Lists, and that part works fine, along with everything else in the form and in SharePoint.
-
There is no custom code in the form.
Thanks for your thoughts...!
[Update 2011-09-23: I think the informationI need is how to filter to just get that particular form's ID. I have a field in the form called "Doc-Name" that is unique and this populates the Name field in the SharePoint form library, but I just can't figure out how to make the form filter to get its own ID. I do understand the form has to be submitted first in order to be assigned a SharePoint ID.]