InfoPath Integration & ListItem ID

  • 16 April 2008
  • 1 reply
  • 0 views

Badge +7

Hello guys,


I try to manipulate the ListItem Permissions of a form used within a K2 Process (I need to restrict the Read-Access to involved persons).


I think this works over Sharepoint Management Event. This Wizard asks for a ListItem ID. I try to find this in K2 - but I can't find a field for that.


Is there a simple way to get the ListItem ID of the InfoPath Form of the running workflow??


By the way:


In this Wizard alternatly to the "Sharepoint List Item" exists a "K2 Process Item". What is that? Is this a simple way to address the InfoPath Form Item?


Thx for any help.


Anja


 


1 reply

Badge +3

This might start to get more complicated than you want, but you might be able to achieve this using both the InfoPath integration and the SharePoint Events Process integration. The SP Event will add XML fields to the Process that you can use to grab the ID of an item. You might have to trigger the Process with the New Item event rather than the form Submit and then just use form submits to update the process later. 

In BlackPearl, I think you will find the ID in the Context Browser here:

> Process/Activity Data
   > XML Fields
     > [Process Name]
       > EventDetails
         > EventDetails
           > ListItem

But I haven't tried this so I'm not 100% positive. However, are you sure this is what you want? Won't that form be deleted by K2 once the activity is complete anyway?
   
Besides all that, there probably is a simpler way! I would be interested in knowing what that is too! I'm trying to find an easy way to query the ID of a list item as input into K2 events based on some other value in the ListItem (like a certain string in the 'Title' field. I know how to do this in code, but I don't want to. I suppose I could use the SP Search event too, but that also seems round-about to me.

Anyone else know how to query a List and get an ID based on a condition for another column in that List? Seems like it should be easy given OOB tools. Maybe I'm missing something simple. Thanks.

 

Reply