Skip to main content

I have set up a smart object that returns multiple values from a web service and I need to be able to get each return value assigned to a data field or list of some kind for use in creating a separate text strings. The number of values returned is not always the same. Using a smart object action I can get the values into a data field but it just appends each value into a single text string.


Using the smart object tester it returns the values as a list is there some way I can create a data field or some way of holding the list so that I can create the text strings separately.


I also have a related question of how to query multiple active directory users by status and start a separate workflow on each returned value. I cannot seem to figure out how to map multiple return values for several things.

The answer I give may not necessarily be applicable in your case, but I'll give you the approach I usually take when needing to do work x times, where x will only be available at run time. 


An Activity has an an option in the Destination Rule called Plan per slot (no destinations). What this option does is it executes a method that is expected to have a list as a return and will execute the activity for each row. You can typically alos access a field in each row (typically the Primary key or the text in your case), so you can expect to work with individual entries. Have a look at the following with regards to this (different approaches, but should give you options):


http://help.k2.com/en/kb000685.aspx


http://www.k2underground.com/blogs/johnny/archive/2010/05/06/k2-4-5-tip-of-the-day-executing-a-specific-event-for-each-piece-of-data-in-a-list-array.aspx


Reply