How to use a!queryentity to query data from multiple CDTs?

I am using three a!queryentities inside {} curly braces to query data from 3 CDT's. Data is getting populated in the rule but problem is in the grid. In grid data is getting populated for the first two columns but not for the other columns as they contain multiple data. Code used :

local!datasubset:todatasubset(local!data),
a!gridTextColumn(
                            label: "Mach 5 CCD",
                            field: "CUST_CMMT_DT",
                            data: index(
                              local!datasubset.data,
                              1,
                              "CUST_CMMT_DT",
                              null
                            )
                          ),
 identifiers: index(
                          local!datasubset.data,
                          1,
                          "FTN_NBR",
                          {}
                        ),

 

If I remove 1 from grid text coloumn then data is getting populated but in random order. Thanks in advance.

  Discussion posts and replies are publicly visible

Parents
  • Hi Varun, If understand your problem statement correctly.. you have created an expression rule to form a dataset using the dictionary format with {}. The dictionary contains 3 fields for which you are fetching data using a!queryEntity() function on 3 different Data Store Entities (CDTs).
    1. Verify all the query entities whether they are fetching a single column data or multiple columns. If multiple columns, then you may need to use index() function on the result set of the query entity to fetch the target column's data into the respective field of the dictionary
    2. Verify the count/length of each of the result sets which come from 3 different a!queryEntity() because Grid Component either throws an error or behaves in a weird manner during such scenarios where the count/length of data configured for each column doesn't match
    3. Configure the PagingInfo parameter wherever necessary to meet the Sort/Pagination results as expected.
Reply
  • Hi Varun, If understand your problem statement correctly.. you have created an expression rule to form a dataset using the dictionary format with {}. The dictionary contains 3 fields for which you are fetching data using a!queryEntity() function on 3 different Data Store Entities (CDTs).
    1. Verify all the query entities whether they are fetching a single column data or multiple columns. If multiple columns, then you may need to use index() function on the result set of the query entity to fetch the target column's data into the respective field of the dictionary
    2. Verify the count/length of each of the result sets which come from 3 different a!queryEntity() because Grid Component either throws an error or behaves in a weird manner during such scenarios where the count/length of data configured for each column doesn't match
    3. Configure the PagingInfo parameter wherever necessary to meet the Sort/Pagination results as expected.
Children
No Data