The Get Value from List Activity has been knocking around my lab for a few years, pretty much without a purpose in many ways outside of my environment. The reason for this is it accepts a list at input, and well no activity or other source available in the product or here on the Community outputs a list. So in effect without a list to apply at the input it is kinda useless. Until recently. You may come across a List (not from me) and you'll wonder how to handle it in a workflow when no activities accepts a list at input. Well ponder no longer!
First of all - what is the list datatype? The list datatype is a friendly name for an Attribute List, or PSCW_AttributeList which is the actual type name. It is a name value pair. So you add a value to a list with a specific name, and retrieve that value by name at a later stage. The value however can be almost any datatype from an String value, to an Aegis Table (PSCW_Table), to an array to another Attribute List or even an array of attribute lists. The complexity then of the data type is probably a large consideration in why it doesn't appear in workflows and is kept internal to the code.
The purpose then of this activity is to provide a basic level of interaction with a list. It should be made clear at this point that input builder doesn't provide any data manipulation on a list - it can only pass on the list in full, unlike Tables or arrays or string etc. where input builder allows you to access different parts of the data type. Also if you try to squeeze a list into a Table, Array or string or any other input type of an activity, the activity will simply error out before it runs with a data type mismatch error. Enter the historically awkwardly named getPSCW_AttributeListValue activity! Remember this activity is only of any use if you find an attribute list data type to use at its input.
The inputs are simple, the "PSCW_AttributeList input" which takes the attribute list, and the "Attribute Name" which takes the name of the attribute you want to retrieve. Happily the Web Operator Console and Debug mode both display lists and their contents quite well (especially debug mode) so you can see what data is available in lists during testing. There is also an Attribute List Array index input. If somehow you come across an Attribute list array as an attribute in a list you can use this index to extract the required attribute list from the array.
There are a number of outputs mainly because there could be a wide variety of datatypes stored in the list. The current version of the activity handles the most common types and any type which has a string compatible value.
The main outputs are:
Attribute Found: A Boolean type, returns true if the attribute was found in the list. Attribute Type: The type of attribute. After testing you'll know the datatype in advance but this will help with working out which output to use. Depending on this value, one of the other type specific attributes will contain the value of the attribute. It may also output "UNKNOWN" for any type not yet handled by the activity - let me know if you hit an UNKNOWN and we can work to get it added! Number of Attributes: The number of attributes in the input list. Helpful to ensure the list is not empty.
These are the main outputs for the corresponding datatypes! outputString outputTable outputList outputArray outputBool outputListArray
If you get an 'outputList' you'll have to put the output into another Get Value from List Activity. If you hit a outputListArray then you'll have to loop through the array - lots of workflow fun!