Issue is getting keys list from dictionary, returning type is any type

Certified Senior Developer

Hi,

KIndly help me how to get keys from dynamically listed dictionary, this could be of any type means list of variant, list dictionary, list map, map, dictionary,

when getting result, it is type of dictionary, when checking its type it is showing of any type. 

Below is the code which is not working.

a!localVariables(
local!data: {
id: 1,
name: { firstname: "shree", lastname: "tiwari" }
},
local!name: property(local!data, "name", null()),
local!keys: a!keys(local!name),
local!keys

/*{*/
/*typename(*/
/*typeof(property(local!data, "id", null()))*/
/*),*/
/*typename(*/
/*typeof(property(local!data, "name", null()))*/
/*),*/
/*property(local!data, "id", null()),*/
/*property(local!data, "name", null()),*/
/*local!keys*/
/*}*/

)

Commented code to check type of above local!name variable.

added screenshot of response for reference. 

Kindly suggest how to do this in appian.

Thanks in advance,

Shree Krishna Tiwari

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I can recreate this.  Simplified version:

    a!localVariables(
      
      local!data: {
        id: 1,
        name: {
          first: "mike",
          last: "schmitt"
        }
      },
      
      /*a!keys(local!data)*/
      a!keys(local!data.name)
    )

    Running it on the parent dictionary works:

    But it fails inexplicably when running it on the child dictionary, even though it should be functionally identical to being run on the parent:

    I'd suggest opening a Support Case with Appian Support.

Reply
  • 0
    Certified Lead Developer

    I can recreate this.  Simplified version:

    a!localVariables(
      
      local!data: {
        id: 1,
        name: {
          first: "mike",
          last: "schmitt"
        }
      },
      
      /*a!keys(local!data)*/
      a!keys(local!data.name)
    )

    Running it on the parent dictionary works:

    But it fails inexplicably when running it on the child dictionary, even though it should be functionally identical to being run on the parent:

    I'd suggest opening a Support Case with Appian Support.

Children