Accessing Values in Dictionary

Certified Associate Developer

 

Hi team

I want to access values in a dictionary without using a loop, because in real-time we have 440 rows, and each row has 150 columns. Running a loop over each row to get values is causing performance issues.

I checked the Appian Community and found that we can use the a!keys() function to extract all keys

Id (PK), PartNumber, Status, Country_1, Country_2, Country_3, ..., Country_150

We are using CDT to get data from DB so output of CDT in dictionary format.

Expected output:
countries: {
{country_1, country_2, country_3, ..., country_150}----for 1 st row
{country_1, country_2, country_3, ..., country_150}-----for 2nd row
}
*** One way i found is writing index on all 150 columns  but it will increase code length  is ther other alternative way other than this

  Discussion posts and replies are publicly visible

  • 0
    Certified Associate Developer
    in reply to Harsha Sharma

     Thank you for your time,

    The approach you're suggesting also works without using a nested for loop. However, we still need to call the child record inside the outer loop.
    For example, if the number of rows is 440, then we would need to call the child record 440 times. This could lead to performance issues, especially since we can't load all child data at once, we have around 28,000 rows, and the record limit is 5,000.
    Therefore, calling the record in each iteration of the outer loop becomes mandatory, which might impact performance.