I am trying to display read only cdt data (multiple) on a grid within a record.

I am trying to display read only cdt data (multiple) on a grid within a record. Attached is the my code in which I am trying to display a process variable cusipsFee (multiple) of a cdt. I am getting below error

Cannot query [cusipsFee.totalCount] because [totalCount] is a child of a multiple data type. (APNX-1-4203-002)

Can someone please tell me how to display cdt with multiple values on a grid in a record?
Thanks!

SAILCode.txt

OriginalPostID-159050

OriginalPostID-159050

  Discussion posts and replies are publicly visible

Parents
  • @zulfiqarp To the best of my knowledge and as per the information you provided in the post, the problem could be with accessing the 'totalCount' attribute in cusipsFee cdt variable.

    As said by you, if the rf!cusipsFee is a custom data type variable and of type multiple, you should be converting the same variable to a datasubset prior to making use of it in the grid component.

    Here is a simple example:
    load(
    \tlocal!pagingInfo: topagingInfo(1,10),
    \twith(
    \ tlocal!cusipsFee: todatasubset(rf!cusipsFee,local!pagingInfo),
    \ ta!gridField(
    \ ttotalCount: local!cusipsFee.totalCount,
    \ tcolumns: {
    \ ta!gridTextColumn(
    \t label: "CUSIP",
    \ tdata: index(local!cusipsFee,"cusip",null)
    \ t)
    \ t},
    \ tvalue: local!pagingInfo,
    \ tsaveInto: local!pagingInfo
    \ t)
    \t)
    )
Reply
  • @zulfiqarp To the best of my knowledge and as per the information you provided in the post, the problem could be with accessing the 'totalCount' attribute in cusipsFee cdt variable.

    As said by you, if the rf!cusipsFee is a custom data type variable and of type multiple, you should be converting the same variable to a datasubset prior to making use of it in the grid component.

    Here is a simple example:
    load(
    \tlocal!pagingInfo: topagingInfo(1,10),
    \twith(
    \ tlocal!cusipsFee: todatasubset(rf!cusipsFee,local!pagingInfo),
    \ ta!gridField(
    \ ttotalCount: local!cusipsFee.totalCount,
    \ tcolumns: {
    \ ta!gridTextColumn(
    \t label: "CUSIP",
    \ tdata: index(local!cusipsFee,"cusip",null)
    \ t)
    \ t},
    \ tvalue: local!pagingInfo,
    \ tsaveInto: local!pagingInfo
    \ t)
    \t)
    )
Children
No Data