Read Only View for Approved form in Sharepoint Form Library - InfoPath Dev
in

InfoPath Dev

Read Only View for Approved form in Sharepoint Form Library

Last post 10-02-2008 02:04 AM by santhoshp. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 09-30-2008 05:42 AM

    Read Only View for Approved form in Sharepoint Form Library

    Hi
    I am working on a form template on which there are many editable control for information gathering. The template is browser based and has to be published in Sharepoint Form Library. The from library will be having a Out Of The Box Approval Workflow for approvar to approve the form submitted to library.
                    What actually i want is:-
                     I need to make the uploaded form as read-only(i.e, all its editable control become
                     disable for editing) as soon as the approver complete the workflow task by approving
                     the form submitted to library. That is, the user can open the form  to see information
                     it contains but cannot edit it further after it is approved.

                    

    Thanks | Pankaj | India
  • 09-30-2008 06:18 AM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: Read Only View for Approved form in Sharepoint Form Library

    Hi,

     

    Can you please follow the below steps:

     
    1. Add one view for read only.
    2. And copy past the editable view to read only view.
    3. Double click on the "Read only" view in the taskpane and check the read only check box.
    4. Add one field as “Status” in the schema and set status value in that field.
     

    Write following code in the Unload.

     Status = XDocument.DOM.selectSingleNode("Status field Xpath");if (Status = Approved){thisXDocument.ViewInfos[Read only].IsDefault = true;}

     

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 09-30-2008 06:54 AM In reply to

    Re: Read Only View for Approved form in Sharepoint Form Library

    Anuma
    Actually I am wondering that according to you i should have "status" field in my form template, but i need to keep track of the workflow field(column) of form library, i.e., when that column get updated to "Approved" status, my submitted form template should open in Read-Only view. Do my requirement will suffice your code snippet? Any comments...
    Thanks & Regards
    Pankaj

    Thanks | Pankaj | India
  • 09-30-2008 07:14 AM In reply to

    Re: Read Only View for Approved form in Sharepoint Form Library

    Hi Pankaj,

    Get the status of the form (SharePoint column value) by using ‘GetListItems’ data connection (receive data from webservice and give the sharepoint url like http://servername/libraryname/_vti_bin/lists.asmx) and set that value to a hidden field in the form.

    By using that value put the conditional formatting for the fields.

     

    Swathip
    www.ggktech.com
  • 10-01-2008 02:52 AM In reply to

    Re: Read Only View for Approved form in Sharepoint Form Library

    Hi Swathip
    I am just unable set the parameters value wile accessing the GetListItems(). Cal u just help me how to do that. It is showing me the error like:

    "The SOAP response indicates that an error occurred on the server:

    Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
    <detail><errorstring xmlns="
    http://schemas.microsoft.com/sharepoint/soap/">Element &lt;Query&gt; of parameter query is missing or invalid.</errorstring><errorcode xmlns="http://schemas.microsoft.com/sharepoint/soap/">0x82000000</errorcode></detail>
    "

    I would like to say that i hav correctly set List, WebID, ViewName as their Guid...Please let me know what I am missing in <Query> element

    Thanks | Pankaj | India
  • 10-01-2008 06:33 AM In reply to

    Re: Read Only View for Approved form in Sharepoint Form Library

  • 10-02-2008 02:04 AM In reply to

    Re: Read Only View for Approved form in Sharepoint Form Library

    Hi, 

    By following these steps you can get the Work flow status ID's into form.

    1. Add a field to have unique ID for every form and promote this field to sharepoint.
    2. Take the secondary data connectiuon as Receive data connection to SharePoint list (Make sure that unique ID column and Work flow Status column check box in data connection wizard is checked)
    3. Add a status field in form and bind that field to Work flow Status column from sharepoint by filtering the value using unique ID column.

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