Search code examples
exacttargetampscript

LookUpRows on rowset created with function BuildRowSetFromString


Is it possible to apply a function like LookUpRows or Lookup to an array created with BuildRowSetFromString?

I have this:

SET @rowSet = BuildRowSetFromString(@ItemsString2, '|')

I'd like to know if there's a function on which I can do:

SET @var = LookupRows(@rowSet, ITEM_ID, ... ) 

I am trying already using a FOR loop. I want to know if there's a function that can do this.


Solution

  • No. I wish.

    Best bet would be to use arrays in Server-Side JavaScript or possibly GTL.

    If you want to over-engineer it, you can use XML and XPATH to do some array functions in AMPScript. I've written up a use-case with examples here on my personal blog.

    Also, there is a lot more SFMC dicussion going on over in http://salesforce.stackexchange.com.