Slinger's Thoughts

June 29, 2009

Is it too much to ask to have relative paths in InfoPath forms?

Filed under: SharePoint — slingeronline @ 11:13 am

I was working on something recently to make the job in one of our departments easier.  Instead of using a word document and filling out everything manually, (which can lead to errors) I wanted to create a form using InfoPath that would allow the members of this department to select items rather than manually fill in values.  I did manage to get it working… once.  It seems that any time I recreate a site template, or even a document library using this form, I need to rebuild the data connections for the form, which means that I also have to rebuild all of the relationships in the form as well.  All because InfoPath isn’t able to use relative paths for any of it’s data sources. 

Here is the issue that I have and what I did to solve it.  (Please note, that this solution is not recommended as this isn’t really a solution but more of a very clunky work around, and the issue remains that this will only work once.  If you save your library as a template, the form that you created will not work in any libraries created from the template. )

Our Document Control department is frequently having to generate a “transmittal” form for our clients and vendors.  All that this form is used for is information.  Which files were sent when, and to whom.  There is a slight difference between the forms used for our vendors, and the ones used for our clients.  I was hoping that instead of our Document Control department having to create this file by manually entering relevant information into a Word Document, that an InfoPath form would make their jobs much easier.  So I began working on it.  I created a form library to hold the filled out forms and documents that would be “transmitted.”  (“Transmitted” is industry lingo for “mailed.”)  All that a user would have to do is click on the “new” button in the library and a new blank form would be generated, and automatically numbered.  After some trial and error I got that part working.  Next thing I needed was to have the recipient’s name and address automatically populated.  When the user selects a company name from a drop down menu, the rest of the pertinent information gets automatically populated.  So far that’s one submit and one receive data connection.  Now the fun part begins.  I wanted them to be able to select a document from the library so that the metadata information from the file would automatically populate.  For this, I had to use the owssvr.dll extension to SharePoint. (Apparently they thought that choosing any field but the file-name would be all that was needed.  I needed to be able to choose the filename as well.  This data connection is limited by the GUID of the list you are trying to select items from.  That’s fine, except that this GUID is also static.  I have also been unable to modify any of the files that were selected in the form once the form is submitted.  I would like to be able to update a field on every item that was selected in the form, so that our Document Control department wouldn’t have to go back to every file that was listed on the form and change a field on them to reflect the “transmittal number” on the form.  Ultimately I wound up with 5 data connections. (I still needed that last submit one to update the file fields, I could never get that one to work correctly.)  Out of all of the data connections that I had, only one of them didn’t need to be recreated every time I created a new library from the template that contained this form. I understand regarding some of the data connections coming from a different site in my site collection, but those connections aren’t an issue.  It’s the ones that tie back to the same library that the form is for that I have an issue with.  Why can’t I have a relative path for my data sources?  Why can’t I select the filename using the standard data connection instead of using the owssvr.dll extension?  Why can’t it just work!  (Sorry, I get frustrated easily lately.)  Since I am not a developer I don’t know if this is something that a developer could accomplish.  It just seems to me that there are some things that SharePoint overcomplicated.  If anyone has an answer to who to get this done, I would be more than willing to give it a try.  As it stands, I am going back to rebuilding all of the forms so that they work, sort of.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at

%d bloggers like this: