Unable to retrieve comma separated values in Key Value Map

rohitmonga
Participant II

I have save an entry in Key Value Map with value as "admin,user" but get operation is giving only "admin" with this key. If I change value to "admin:user" then I am getting correct value.

Ket Value Map is not returning correct value if I save value with comma separated.

Solved Solved
0 2 456
1 ACCEPTED SOLUTION

@Rohit Monga

Please specify index value in multiple valued KVM. Index will help you in fetching a particular value you want from KVM.

The index number (in a 1-based index) of the item to fetch from a multi-valued key. For example, specifying index=1 will return the first value and assign it to the assignTo variable. If no index value is specified, all the values of that entry are assigned to the variable as a java.util.List.

View solution in original post

2 REPLIES 2

@Rohit Monga

Please specify index value in multiple valued KVM. Index will help you in fetching a particular value you want from KVM.

The index number (in a 1-based index) of the item to fetch from a multi-valued key. For example, specifying index=1 will return the first value and assign it to the assignTo variable. If no index value is specified, all the values of that entry are assigned to the variable as a java.util.List.

But I am unable to iterate this list in js policy. Also If I check in trace I am getting only first value.