Skip to main content

I am attempting to emulate this: http://community.k2.com/t5/K2-blackpearl/Can-smartobject-events-in-a-process-be-sorted-by-a-particular/td-p/77946


but my Steps change a little bit:

  1. Add a Default Activity to your workflow. 
  2. Select the Destination Rule and run in advanced mode
  3. Select "Plan Per Slot (No Destinations)" 
  4. Select the option "Select a list field to determine how many slots should be created"
  5. Drop your SmartObject list event in the box.
  6. Add your inputs and filter. In the return property select the ID for the SmartObject.
  7. In the List Options select the "Order Results By" and choose  Descending and theSort Order field property.
  8. I wish to return all results that match the filter, I have attempted this, but the workflow returns an error on the step when I try to return all the results.
    If I return just the first result, it will work.

    Any ideas how to return all results to a datafield?

    I was hoping it would come out something along the lines of Datafield = 1;3;6;7;

I figured out that my error was related to the type for my sort column, I sorted by a different column and the step went through without an error.

The next issue that popped up was that it was only returning the last item id in the series, and I wanted the entire series returned.

To return each item ID in a string, I added a data event to the Activity where I had set the destination rules.

Source: ApprovalIDStringDataField;ActivityInstanceData

Destination: ApprovalIDStringDataField

 

The string at the end gets formatted like this: ;1;2;3;4;5 and with another data event I can change the string to be formatted like 1;2;3;4;5;

My end goal being to put the string into a for each loop to process a list in that specific serial order. 

 


Reply