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!