Saturday, September 25, 2010

InfoPath 2010: The Infamous Form Name

Yes the infamous form name issue. I rant on about this in my InfoPath Book. I always had an out with the dilemma of new versus updates and keeping the same name.



Several members of my audience at SharePoint Saturday Baltimore eluded to a good solution and one of my colleagues came up with the same idea. It's not anything new but a good altenative if the fields you decide to use can be edited and changed.


The first part of this requires a common theme in form template design; determining if the form is a new instance. I have used a IsNew-type field in the past where the default is 0 or false and when the form instance is rendered (or submitted), rules force it to 1 or true.


So for the form name, instead of using a function at the time of submission, use a field value that has been pre-calculated. If the form is new, create the form name and store that into a field. Then, use that field as the form name that is saved during submission.



This way, the form name will never change during edits. So using an entered field, todays date, etc. in the form name will never have the chance to change since the form name is initially figuired out when the form is new.



3 comments:

  1. When is the book being published Steve?

    Want to get my hands on it real fast!

    ReplyDelete
  2. It hit the warehouse today so it should be going out next week. Many online retailers have it available for pre-order which means it will be shipped to you first.

    ReplyDelete
  3. Hello there! This is my 1st comment here so I just wanted to give a quick shout out
    and tell you I truly enjoy reading through your articles.

    Can you recommend any other blogs/websites/forums that deal with the same
    subjects? Thanks!

    my webpage - site

    ReplyDelete

Matched Content