Skip to main content
February 5, 2022
Solved

index Function on Map is not behaving correct

  • February 5, 2022
  • 9 replies
  • 2 views

Hi All,

I have an Map operator which contains key value pairs as 

{eventId:6,actualsId:1,planId:2}

i saved it in a process variable in a script task and then when i tried doing the value as 

pv!map.eventId it is saving the value as 6,

if i do index(pv!map,"eventId",999) it is saving as 999 instead of 6.

Not sure what is the issue. Any one faced such kind of issue in process model.

Please Note : I tried this in Process model not in rule. In rule it is working fine.

    Best answer by stefanhelzle0001

    Did a quick test. Same behaviour here. For this does not look like expected. Try to open a support case.

    9 replies

    harshavAuthor
    February 5, 2022

    [mention:126a676c85024855948336691b0a7b92:e9ed411860ed4f2ba0265705b8793d05] [mention:6b9f80ff18f9420082d13ef2d5121d56:e9ed411860ed4f2ba0265705b8793d05] Any thoughts on this please.

    stefanhelzle0001
    Brainy
    February 5, 2022

    Just some simple questions.

    Did you check that the pv is of type map?

    Did you check that the pv contains the expected values?

    harshavAuthor
    February 5, 2022

    Yes [mention:126a676c85024855948336691b0a7b92:e9ed411860ed4f2ba0265705b8793d05] i did check them it is of type Map and the Map contains the expected values [emoticon:c4563cd7d5574777a71c318021cbbcc8]

    gopalk2865
    Participating Frequently
    February 5, 2022

    Hi Harshav, Yes index function is not working here but as of now , for work around you can use "dot" instead of index function.

    harshavAuthor
    February 7, 2022

    Thats the way i am actually doing it as my workaround.