Skip to main content

Hello,


I'm trying to retrieve information of a list item / document through an event handler. When a document or item is added I receive an event that a new item was added including some metadata from the Process fields. But how can I retrieve additional SPFields of this item. When I run through the SharePoint List Items Event Wizard in a K2 project I get a dialog called "List Item Metadata" where I can assign values but NOT retrieve values although I started the Event Wizard with a "Get List Items" Event? Anybody who can shed some light on this?


Thanks, DD

Hi DD,


You are looking in the right place. The Sharepoint List Item event --> Get List Items is correct. You supply the wizard with the list item ID you got from your SPEventField so that you can pull the right list item. Then, on the List Item Metadata page, you assign where you want the metadata you are pulling in saved. The value column is the name of the fields. In my screen shot, I chose to assign the meta data to an Process XML field I called Test. When complete, you will have a process data field (xml or otherwise) that represents the meta data you are after.


 


15661iCE43264DD8FFAF24.jpg

Hello Scott,


Thanks for the answer and the screenshot that showed me that I was on the right track.


There were several issues that prevented me seeing metadata properties. In my case I wanted to retrieve specific fields of an Infopath document. Here are some hints in case somebody else needs to achieve similar.


- in order to access certain fields from K2 (without accessing the Infopath document itself), these need to be propageted properly through Infopath property propagation


- when an Infopath document is updated repeatedly it might happen, that you loose property information (there was another thread about this) - in this case you need to repropagete the properties (you can see if the information is still accessible from MOSS if you change to the document library and display those properties in the list view).


- In the "Get Document Metadata" wizard where values can be assigned 4 options are given; I tried endlessly to assign the values to various XML fields in the process / activity data and ended either with no assigned values at all, or by getting the whole document with it's values. So by puzzling over, I finally tried to assign metadata fields to "process data fields" and it turned out, that this was the option I was after. With process data fields single metadata fields can be assigned to single process data fields. 


Reply