Manipulate Infopath data before upload to library

  • 29 September 2010
  • 4 replies
  • 1 view

Badge

I am using K2 designer to impliment a browser enabled Infopath integrated process that periodicly uploads the infopath form to a read only form library while continueing the process. I am attempting to change the DocumentView field to 'Read' so that when the user opens the read copy it will default to the read view I created in InfoPath.


The way I used to accomplish this before our upgrade to 4.5 I used a 'Data Event' just before the 'SharePoint Document Event' that uploaded the form. In the 'Data Event' I would change the DocumentView value so that when the 'SharePoint Document Event' fired it would upload it with the changed value.


This no longer appears to work in 4.5. Anyone else have this problem. It doesn't error it just uploads the document and ignores the change.


4 replies

Badge +2

In Blackmarket there is an unsupported addon to change the view of an InfoPath form before upload.  There was also a blog post on how to change the view but it has always worked. Here is the link that has a suggestion on how to change the document view before upload.  Again it doesn't work for everyone.

Badge +3

i dont see any problem doing that. i have done it before.


try to create a new simple process and use a data event and change the document view field. and the use sharepoint upload document wizard and see the result.


 


There could be issue with the wiards since you have upgraded ur environment to 4.5,   Update the design templates as well once you open the workflow.


lets know if this helps.


 

Badge +10

I'm using the same approach in 4.5 1170 which is working fine. 


I would double check a few things like look at the InfoPath form in notepad and ensure that the Document View is set to "Read".  If not ensure that you're setting the XML and uploading at the same level (both at the process level or both at the activity level).


Double check the View rule is automatically being created by K2.


I have heard of people having problems when they rename a view and I believe there is a posting on the forum with the fix (don't remember offhand)


If that doesn't work try with a new InfoPath form with a new process to ensure your technique is working correctly.


If it works in a new process and you're doing exactly the same thing occasionally but not often I've had troubles with Activities that contain an InfoPath client event with weird behaviour.  In the end deleting that activity and recreating it solved the problem.



 


Badge +2

Hi,


i have one more issue, i want to switch the view based upon the query string value. in the infopath form form_loading founction i will get the querystring value and change the document view depends on the querystring value. i write the C# code below


e.InputParameters["type"] = "view1'


MainDataSource.CreateNavigator().SelectSingleNode("/my:MyCompliant/my:_K2/my:DocumentView", NamespaceManager).SetValue("View2");


After uploading the infopath form.i will access the form it raise the 5337 error. it does not execute.


Please advise me if any way to achieve this scanerio.


Ramesh

Reply