Skip to main content

Hai all,


How to retrieve a particular sharepoint list item to a k2 black pearl process(k2 designer for VS) and how to check with a string.


Help would be appreciated. 

Here is what I've found, but I believe that others may have alternate methods I'd like to hear.
From the K2 managment console, go to services. open the Sharepoint service. Add a new instance and put in the URL of the sharepoint server. You can also specify just certain lists to include, or leave it blank. Save it an now you have a service object for sharepoint lists in the server you selected.
Next create a smart object. Use advanced mode and remove all the smartbox methods. Add properties to the smart object for each column from the original list you want to include. Also make sure to add a property for the item id of the sharepoint list item.
Next add a method to retrieve the list item(s). You be able to select the GetList method of the service object you created in the first step.  Make the method a list method type to retrive all the rows. You will probably want to select a specific item, with an item id as the unique identifier. Add another method for that and map it to the service ojbect method that takes the id. Again map the output of the service object to your smart object methods.
You could also use the smart object tester to create the smart object. It will have all the methods available to you, but my have more methods and data than you care too. It all depends on what you are trying to accomplish. 
 
Hope that helps!

Another option would be to use the SharePoint Search event wizard to locate the item you are looking for. 

Hi panmanphil , thanks for ur reply,


the thing is that i need to get a particular SP list item and i want check the item with a string. If the list item is equal to the string,then the process proceeds otherwise quits. This is my req. If u could find the way,plz explain me.


 


Just my additional thoughts about the answers given yet: 


 You can't check an SPListItem item with a string. I guess you want something like that


 item "MyColumn"].Value == myString


The SmartObject stores the value of  item "MyColumn"].Value; myString could be a process or activity field to can be compared to it.


The particular SPListItem (stored in the SmartObject) is received with the created Sharepoint Service that takes the list id and the "particular" item id. You've probably two outcomes of your process, one finishes and one proceeds.


Reply