set readonly when finished - InfoPath Dev
in

InfoPath Dev

set readonly when finished

Last post 05-04-2009 06:07 PM by tza_03. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-09-2009 02:40 AM

    set readonly when finished

    Hi,

    My form has an attached workflow.  When the workflow finishes, the form and list item should be made read-only to prevent any further updates.  How can this be acheived?  I can see no way with SPD workflows, OOB IM policies or infopath code!   Even the MainDatasource.ReadOnly field is read-only!!  Is this not a standard thing to do with a form?? 

    Craig

    Filed under: ,
  • 04-16-2009 11:05 AM In reply to

    Re: set readonly when finished

    Pretty easy, I think, but let me know if it's TOO simplified.

    1) Create a Completed boolean data element that will be set to true when the workflow is finished (must default to false and must be a promoted property that can be editable in the form library - hit the checkbox when publishing)

    2) Create a read-only view and set a form option rule that changes to this view if the Completed boolean field is True.

    In SharePoint, the form itself won't be read-only, but no one will be able to do anything in the form, because they always get presented with a read-only view.  This is one of several methods I use to manage "rights" within the form itself.  One risk here is that someone could feasibly edit the properties of the form and set that checkbox to false, then go change the form.  Is this an acceptable risk?  It is for me in most cases.

  • 05-04-2009 03:10 AM In reply to

    • tza_03
    • Not Ranked
      Female
    • Joined on 04-09-2009
    • MALAYSIA
    • Posts 18

    Re: set readonly when finished

    Hi,

    The solution given is really simple and easy. What I did is rather tedious. I created a Completed boolean data element and set it to true when user click Submit button. Then I put a conditional formating at every data element and set it to read only when the Completed data element equal to true.

  • 05-04-2009 07:37 AM In reply to

    Re: set readonly when finished

    Laf, ouch.  Brute force method!  =P

  • 05-04-2009 06:07 PM In reply to

    • tza_03
    • Not Ranked
      Female
    • Joined on 04-09-2009
    • MALAYSIA
    • Posts 18

    Re: set readonly when finished

    Could not think of any other way at that time. Haha

    Only half of the data elements are required to be read-only upon submission of the form.

    The other half are left for the approvers to approve or reject the form.

    I start working with InfoPath two months ago =)

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