Trying to Display data in read-only grid

Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!gridField [line 497]: A grid component [label="null"] has an invalid value for "data". "data" must be sourced from a Record Type, a query, a list of Dictionary, a list of CDT, or a data subset. Received: Text

I'm trying to refactor the code to display the data in read-only grid the previous version is with a!gridSelection() which is passed form expression rule to an interface to handle a!pagingInfo() and as per my understanding a!gridSelection() is deprecated and instead a!gridField() should be used.

rule!abc_expression(

     select:rule!selectionFilter(),

     queryFilters:{

              rule!queryFilter(),

              a!queryLogicalExpression()

             },

    pagingInfo: ri!gridSelection.pagingInfo

)

------------------------------------------------------------------------------------------

                                     Interface

--------------------------------------------------------------------------------------------

local!define: a!gridSelection(
                         pagingInfo: a!pagingInfo(
                                                   startIndex: 1,
                                                   batchSize: 20,
                                                   sort: a!sortInfo(
                                                               field: "name",
                                                               ascending: true
                                                              )
                                                   )
                                             )

local!first: rule!abc_expression(

                         gridSelection: local!define,

                        input: one,

                       input:two

                     )

local!dataSubset: todatasubset(
                   rule!cde_Index(
                                   path: "id",
                                  dictionary: local!first
                           )
)

-----------------------------------------------------------------------------

                 Grid code to display in interface

------------------------------------------------------------------------------

a!gridField(
     data: rule!cde_Index(
                  path: "data",
                 dictionary: local!dataSubset
),
columns: {
         a!gridColumn(
                     label: "id",
                   value: rule!PRO_TK_Index(
                               path: "id",
                               dictionary: fv!row
                 )
              )
},
pagingSaveInto: {
            a!save(
                target: local!define,
                value: save!value
            ),
          a!save(
               target: local!first,
               value: rule!abc_expression(
                              gridSelection: local!define,
                                           input: one,
                                           input:two
                    )
),
        a!save(
                  target: local!dataSubset,
                  value: todatasubset(
                               rule!cde_Index(
                                       path: "id",
                                       dictionary: local!define
                                 )
                           )
                   )
         }
)

So I'm getting following error highlighted in red colour can someone help me to understand this and fix it.

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data