Is XML data editable in SharePoint? - InfoPath Dev
in

InfoPath Dev

Is XML data editable in SharePoint?

Last post 12-21-2005 08:53 AM by puziuss. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-20-2005 04:45 PM

    Is XML data editable in SharePoint?

    Hi,

    does any body know if there is an easy way (or any way) to edit XML document directly from SharePoint web site?
    Let me explain my situation to give you a better idea of what my issue is.
    I have an InfoPath form (PTO request) that users fill out and submit to a SharePoint Form library. Most of the form functionality is implemented using managed code. The form has multiple views that are used to load a form in depending on user credentials, user group membership (as that in AD) and what the status of the request is (it can be Submitted, Approved, Denied, Modified, Cancelled, Paid and Partially Paid). There is an XML node "Status" in the form which changes every time when user takes an action (there are different buttons to handle different actions: Submit, Edit, Cancel, Approve, Deny etc).
    A simplified workflow scenario is as follows: when employee submits a PTO request to Share Point library an email notification of a new request is being sent to employee's manager who has to review this request. So, manager opens this InfoPath form in manager's view from SherePoint website (a link to a submitted form is provided in notification email, not the form itself) and approves or denies the request. So far so good: every time when request status changes form is actually re-submitted to SharePoint library overwriting an existing one.
    The next step is to do a payroll. I would like HR to be able go to SharePoint "PTO Form" library and to assign "Paid" or "Partially Paid" status to those requests that are to be paid this pay period (those requests that have been approved and PTO dates fall into selected pay period). But I don't want to make HR person to open each form in InfoPath and change the status for each form individually. I want them to be able to do it directly from SharePoint site to all selected forms at a time. And I want this status change to be reflected no matter what SharePoint data view is selected (every user group has their own view). Thus, I need to change XML node value. Here is my problem. I can't make it possible to modify request status which is a part of XML document in SharePoint data view!
    Is it possible to remove the lock that SharePoint seems to put on all XML documents stored on the web server making data read-only?

    If I cannot access and change XML document via SharePoint interface my other thoughts to work around that are to try updating XML document using web service. What I could possibly do is to create an additional "Status" column in SharePoint data view table (that would be purely SharePoint column) which would be used for HR to assign request a new status ("Paid", for example). If I make data fields in that column of dropdown box type I could use an "onAfterChange" event handler to pass that "SharePoint status value" to a web service which would update "Status" value of original XML document.

    Does it make any sense? Or I am making things even more complicated missing some obvious simple solutions?
    I thought I could use InfoPath form "merge" feature for HR view but I don't like the fact that merging many forms into one form InfoPath indeed creates a new form from data of multiple XML documents. Therefore, any changes that are made to this merged form does not affect source documents. My initial impression was that merging multiple forms it would link data to its original locations just displaying it as one form. I wish it worked that way:)

    Thank you for any suggestions!
  • 12-21-2005 04:08 AM In reply to

    Re: Is XML data editable in SharePoint?

    Hi,

    yes the displayed fields (status etc) are read only in sharepoint, so even if you try and change them in data grid mode (witch would be handy for changing multiple fields at the time as you request) you get an error.

    I guess your suggestion would work, using Lists.asmx or a custom web service.

    I see no obvious way of doing this other than from InfoPath

    //AndersR


  • 12-21-2005 08:53 AM In reply to

    Re: Is XML data editable in SharePoint?

    Thank you Anders for your response. I needed somebody to tell me that data displayed in SharePoint are always read-only and I am not just unaware of some SharePoint features.

    Yes, I've tried setting data view status field's read-only property to false in properties.xfp but that gave me an error even though it looked that I was able to change the value of that field. That was just an illusion, the change did not affect XML document in any way...

    Greg, a question for you: is this read-only limitation in SharePoint something that can be expected to be improved in future releases of SharePoint Services? Or Microsoft wants to make InfoPath the only application that can be used to edit XML data if XML document was originally generated with InfoPath?

    Thanks!




    quote:
    Originally posted by AndersR

    Hi,

    yes the displayed fields (status etc) are read only in sharepoint, so even if you try and change them in data grid mode (witch would be handy for changing multiple fields at the time as you request) you get an error.

    I guess your suggestion would work, using Lists.asmx or a custom web service.

    I see no obvious way of doing this other than from InfoPath

    //AndersR




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