Workflow Soluiton

 View Only
  • 1.  Getting Data from an Array

    Posted Jan 26, 2010 10:18 AM
    Good morning,

    I'm certain this is a newbie issue, but I am experiencing a fair bit of frustration trying to get data out of an array and I have not been able to find anything helpful in searching the workflow SWAT site or Symantec Connect. 

    My problem is very simple.  I have an array with three rows of data in it.  Two of these rows are of one Type and one is of another.  I need to separate these Items into two Arrays by Type (two rows in one and 1 row in another).  I would have thought I could do this with Collection Handling Objects, but Have not had any luck making this actually work.  Does Anyone have any suggestions?  I am certain i am making this much harder than it needs to be.

    As a Secondary question,  Are there any actual Detailed books out there that provide good descriptions of Basic to Intermediate functions of Workflow 7?


  • 2.  RE: Getting Data from an Array

    Posted Jan 26, 2010 11:15 AM
    Can you explain more what you mean by "Two of these rows are of one Type and one is of another"? 
    You have two different data types in one array?  Or are you trying to take the items in the array and split them into different data types?


  • 3.  RE: Getting Data from an Array

    Posted Jan 26, 2010 12:59 PM
    Hmm,  I could have been clearer there couldn't I :)

    I have a fairly simple Array:

    ID Type Purchased Used Remaining To Use
    1 Type1 25 10 15 1
    2 Type2 10 2 8 2
    3 Type1 10 5 5 3

    That I need to split, based on the Type Column, into two new Arrays:

    ID Type Purchased Used Remaining To Use
    1 Type1 25 10 15 1
    3 Type1 10 5 5 3

    And

    ID Type Purchased Used Remaining To Use
    2 Type2 10 2 8 2

    Since originally posting this I beleive I have Figured out how to do what I want Using the "For Each Component in Collection" and "Text Equals Rule" Components.

    Did I mention that i am very very new at this ;)

    Thank you for your Response yliquor




  • 4.  RE: Getting Data from an Array

    Posted Jan 26, 2010 02:28 PM
    I think you have it.  That is what I would have suggested.  You can use the copy data element to new location component to build two new arrays as you loop through the collection.


  • 5.  RE: Getting Data from an Array
    Best Answer

    Posted Jan 26, 2010 02:50 PM
    I would use a "Configurable Collection Filter" component instead of a "For each item in collection", "text equals" and "add item to collection. it is a much more efficient method to get your desired result.

    Also for other resources look to www.workflowswat.com


  • 6.  RE: Getting Data from an Array

    Posted Jan 29, 2010 12:54 PM
    Thank you for your Response Jason,  I'm sorry i didn't see it sooner (the notification got flagged as Junk mail )

    I was able to get it to work the way i was going,  but your suggestion about using the "configurable collection filter" greatly simplified things.  Thank you :)