The problem is with the format of the output returned by the local!totalgroupNumbersList and local!groupNumbersList. (Refer line #20 and line #47 of original code). It is an array of arrays. Lets see how it behaves by taking an example as follows: Lets assume that following users has got following groups after applying getgroupsoftypeforuser (getgroupsoftypeforuser returns an array, so each user might have more than one group) on each user: ethomas: [Group:1888], [Group:2987], [Group:3099] vahluwalia: [Group:1352], [Group:1362] elangston: [Group:1387] with( local!totalgroupNumbersList:fn!apply(getgroupsoftypeforuser(_,cons!CONS_FMS_CI_GroupType),{"ethomas"; "vahluwalia"; "elangston"}), /*Refer line #20 or line #47 in your original code*/ /* Access the local!totalgroupNumbersList in following ways to see the difference local!totalgroupNumbersList --> [Group:1888], [Group:2987], [Group:3099], [Group:1352], [Group:1362], [Group:1387] local!totalgroupNumbersList[1] --> [Group:1888], [Group:2987], [Group:3099] local!totalgroupNumbersList[2] --> [Group:1352], [Group:1362] local!totalgroupNumbersList[3] --> [Group:1387] */ ) So if you observe the result of local!totalgroupNumbersList, you can say that the output is an array. But if you observe the results of the each index of array (i.e. local!totalgroupNumbersList[1]/ local!totalgroupNumbersList[2]/ local!totalgroupNumbersList[3]), you can see that each index is also an array, which means that your output is an array of arrays. This is because getgroupsoftypeforuser returns array as an output and this goes on for each and every user, thereby finally resulting in an array of array. (Simply speaking, apply returns an array, and inturn each call to getgroupsoftypeforuser returns an array resulting in array of array.) When you provide the local!totalgroupNumbersList and local!totalgroupNumbersList to the grid (Refer line #119 and line #125 of original code), the array is flattened implicitly by Appian i.e. the array now behaves in below fashion: /* local!totalgroupNumbersList --> [Group:1888], [Group:2987], [Group:3099], [Group:1352], [Group:1362], [Group:1387] local!totalgroupNumbersList[1] --> [Group:1888] local!totalgroupNumbersList[2] --> [Group:2987] local!totalgroupNumbersList[3] --> [Group:3099] local!totalgroupNumbersList[4] --> [Group:1352] local!totalgroupNumbersList[5] --> [Group:1362] and so on... */ Though your output is an array of array, Appian does flattening automatically and that's the reason why you didn't see problem in the first column (Refer line #119 or line #120 of original code) of your grid. Now let's see why you faced an issue in the second column (Refer line #120 or line #126 of original code) You are providing the results of local!totalgroupNumbersList or local!totalgroupNumbersList directly as a context to the apply function. apply function expects array as an context, but the variable you provided is an array of array. So in this case, apply will just work on first index of your array, because your first index in the array itself is an array. a!gridTextColumn(label:"Group List",field:"",data:apply(group(_,"groupName"),local!groupNumbersList)) We might think that the group() function will be applied on each item of local!groupNumbersList. But for the first time, when the function is applied (i.e. on the first index), the context will be finalised because local!groupNumbersList[1] itself is an array and apply function just needs an array (Even if local!groupNumbersList[1] contains one element it is still treated as an array because getgroupsoftypeforuser returns array as an output). So apply function overlooks elements in local!groupNumbersList for the subsequent indices. This is the reason why you are seeing null values for most of the rows in the second column. So that's the reason we have flattened (conversion to plain array) local!totalgroupNumbersList and local!totalgroupNumbersList variables by using togroup function (Refer line#69 and line#79 in modified code). We are passing an array of array as input to togroup in order to obtain a plain/ flattened array because togroup function returns an array. If you access local!groupNumbersList_flattened or local!totalgroupNumbersList_flattened, your outputs looks as follows: (which is exactly in the format expected by apply function) /* local!groupNumbersList_flattened[1] --> [Group:1888] local!groupNumbersList_flattened[2] --> [Group:2987] local!groupNumbersList_flattened[3] --> [Group:3099] local!groupNumbersList_flattened[4] --> [Group:1352] local!groupNumbersList_flattened[5] --> [Group:1362] and so on... */ Note: I have provided the flattened arrays to the (Refer line #157 and line #163) first column in the grid, but they aren't actually needed because here Appian is flattening the array of array implicitly. Where as an explicit conversion is needed for (Refer line #157 and line #163) second column in the grid and that's the reason why we did the flattening. (Refer line #69 and line #79 of modified code)