KVM Policy is not able to to get comma separated values("xyz,covfefe,setf,fef") from KVM entity.

Hi,

Problem : I am not able to get values that contain commas in a KVM GET Operation.

ex:

I have a KVM with following data :

{ 
 "name": "TestSample", 
 "entry": [ 
    { "name": "test", "value": "true" },
    { "name": "clientIdList", "value": "xyz,fefe,setf,fef" } 
 ] 
}

In the KVM Operation policy I am trying to get the values for "clientIdList"

<Get assignTo="clientIdList" index="1">
 <Key>
  <Parameter>clientIdList</Parameter>
 </Key> 
</Get>

At run time, this policy gets only the first value.

clientIdList = xyz;

If I modify my KVM value as "xyz fefe setf fef" (no commas) then the policy retrieves the full string.

Would you please let me know, how to retrieve in case of comma present in value? Why is APIGEE Edge reading just the first piece of this value?

Thanks,

G Ramya

0 2 551
2 REPLIES 2

Below code should work for you. (Omit the index). please verify

<KeyValueMapOperations
    async="false" continueOnError="false" enabled="true"
    name="Key-Value-Map-Operations-1" mapIdentifier="TestSample"> 
  <DisplayName>Key
  Value Map Operations-1</DisplayName> 
  <Get assignTo="clientId"> 
    <Key>
      <Parameter>clientId</Parameter> 
    </Key> 
  </Get> 
  <Scope>environment</Scope>
</KeyValueMapOperations>


Hi Siva,

Yes, with out index attribute it's working as expected. Thank you.

Thanks,

G Ramya