blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

Paul Galvin's Blog

Quick and Simple: Make an InfoPath Form Read Only (InfoPath Forms Services in MOSS)

There's a common business scenario like this:

  • User fills out an InfoPath form.
  • Submits form.
  • Long-running workflow process kicks off.
  • While the workflow is running, we don't want anyone to change the content of the form.

This office.microsoft.com example describes how to create a separate "view" and mark the whole view as read-only.  This is a workable approach but has the drawback that you've effectively created two entire versions of the same form and must now keep them in sync manually.  If you add a field to the editable view, you must then add it to the non-editable view as well.  Over time, with different developers, there can be some divergence. 

This alternative might work better in some cases:

  • Add a new field to the form called "IsEditable".
  • Set its default value to true.
  • Promote it when publishing to MOSS.
  • In the workflow, set the value of IsEditble to false.
  • Go back to the form.
  • Add a rule that "upon open of the form", disable your save button when IsEditable is false.

The drawback to this approach is that all the fields will still be editable on the screen.  The user can get a false impression that they can actually change content.  You can mitigate that by putting in some text that the form is disabled, possibly in big red letters across the top of the page.

In one project, I created a "workflow status" view.  As the workflow progressed, it would update specific status fields that had been promoted from the form.  When the user opened the form, the "open form" rule automatically switched to that view and the user had a nice little summary status.

</end>

Subscribe to my blog.

Published 25 April 2008 09:10 by paul.galvin

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Michael said:

I  am changing item permissions to "read only" on add event for the library . After all,if user has submitted his expense report to Finance he is not allowed to change it, right?

May 27, 2008 17:39
 

infopath said:

June 7, 2008 15:17

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server (Personal Edition), by Telligent Systems