IT Process Automation

Expand all | Collapse all

Dynamically populating Pam Variable of ValueMap Type

  • 1.  Dynamically populating Pam Variable of ValueMap Type

    Posted May 05, 2014 11:47 AM

    I am trying to write a ValueMap from HTTP object into a ValueMap variable that I defined(Var_2). The snippet below causes the error "msg.valuemap.no.indexed.access". I'm sure I am missing something obvious but can't place it.

    length = Process.HTTP_Post_2.HTTPResponseHeaders.length;
    for(i=0; i < length; i++)
    {
      Process.Var_2.size++
      Process.Var_2[i].Key = Process.HTTP_Post_2.HTTPResponseHeaders[i].key
      Process.Var_2[i].Value = Process.HTTP_Post_2.HTTPResponseHeaders[i].value
    }

    If I alter the highlighted to Process.Var_2.Key Var_2 the result is better - the last Key/Value pair of HTTPResponseHeaders is stored in Var_2. Trying to figure out how to get all three key/value pairs.

    Thanks in advance for any pointers!



  • 2.  RE: Dynamically populating Pam Variable of ValueMap Type
    Best Answer

    Posted May 05, 2014 01:11 PM

    You are trying to write out to an array of valuemaps.  Are you sure Var_2 has the "array" option checked?



  • 3.  RE: Dynamically populating Pam Variable of ValueMap Type

    Posted May 05, 2014 01:33 PM

    Many Thanks!