How to read from a Dictionary

HI,

I am trying to read from a Dictionary output provided by the box connected system as shown below . How to read each items such as ID and type to a local variable ?

I tried fn!index(local!folderContents,"id") but it is giving me null output 

Please help me 

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    In the interest of acknowledging the elephant in the room, is it entirely possible to simply NOT NEST the dictionary?  Could you refactor the dictionary such that it's not nested?  It looks like this is 4 Dictionaries deep.

    Two questions really worth considering on a deep, deep level.

    1.  Why is it nested?  What do you gain from the multiple levels?  I venture that you gain nothing but the massive headache you're dealing with right now.  There's no reason all the fields from all the nested parts of "entry" can't just be on the top level of "entry", and there's no reason for the "entry" list to be nested inside two more levels of dictionary either.  What does "result" add that makes it indispensable?  Nesting is generally not recommended, and nesting more than 2 or 3 levels deep is a violation of Appian best practices, so why start the precedent now?

    2.  Why are you using Dictionary?  Why aren't you using a CDT?  Dictionaries are great for an ad hoc replacement for CDT structure that isn't finalized yet.  It's great for mock-ups, but when you do finalize the data's structure, you're supposed to replace it with a CDT.  The CDT is more manageable and makes sure that the structure is maintained, and helps you index fields better, because it comes with a guarantee that those fields are actually there.  With a list of Dictionary, each one in the list could have any fields. Nothing guarantees the structure will be what you expect.  

Reply
  • 0
    Certified Lead Developer

    In the interest of acknowledging the elephant in the room, is it entirely possible to simply NOT NEST the dictionary?  Could you refactor the dictionary such that it's not nested?  It looks like this is 4 Dictionaries deep.

    Two questions really worth considering on a deep, deep level.

    1.  Why is it nested?  What do you gain from the multiple levels?  I venture that you gain nothing but the massive headache you're dealing with right now.  There's no reason all the fields from all the nested parts of "entry" can't just be on the top level of "entry", and there's no reason for the "entry" list to be nested inside two more levels of dictionary either.  What does "result" add that makes it indispensable?  Nesting is generally not recommended, and nesting more than 2 or 3 levels deep is a violation of Appian best practices, so why start the precedent now?

    2.  Why are you using Dictionary?  Why aren't you using a CDT?  Dictionaries are great for an ad hoc replacement for CDT structure that isn't finalized yet.  It's great for mock-ups, but when you do finalize the data's structure, you're supposed to replace it with a CDT.  The CDT is more manageable and makes sure that the structure is maintained, and helps you index fields better, because it comes with a guarantee that those fields are actually there.  With a list of Dictionary, each one in the list could have any fields. Nothing guarantees the structure will be what you expect.  

Children
No Data