Sorting a paging grid column that is a nested CDT.

I have a paging grid and in one of the columns the data is from a nested cdt.  While I am able to get the data portion I am unable to sort the column. I've tried using parentfield.childfield , using index function. What is the best or most simple way to go about this? 

  Discussion posts and replies are publicly visible

Parents
  • hi xingc,
    is your nested cdt is single or array ?
    if single,fetch your details by query rule,and convert id in todatasubset with sorting filed of your childfield ,see below example

    todatasubset(
    rule!XYZ_empDetails(),
    a!pagingInfo(
    1,
    - 1,
    a!sortInfo(
    field: "parentfield.childfield",
    ascending: false()
    )
    )
    ).data


    if you nested cdt is array better to create data base view.
Reply
  • hi xingc,
    is your nested cdt is single or array ?
    if single,fetch your details by query rule,and convert id in todatasubset with sorting filed of your childfield ,see below example

    todatasubset(
    rule!XYZ_empDetails(),
    a!pagingInfo(
    1,
    - 1,
    a!sortInfo(
    field: "parentfield.childfield",
    ascending: false()
    )
    )
    ).data


    if you nested cdt is array better to create data base view.
Children
No Data