I want to have a custom record field, get data from related record field with out any aggregation it is a text field(like we have group_concat and group by in SQL)

Certified Senior Developer

I want to have a custom record field, get data from related record field with out any aggregation it is a text field(like  we have group_concat and group by in SQL). I want to have this field as I want to apply sorting in read only grid on this column

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Lead Developer
    in reply to Madhusudan Tripathi

    Could you explain this use case in more detail? Sorting items in a grid does not require custom record fields typically.

  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    Yes, I have a record lets say "Main_Record". This record has a relationship with another record lets say "Related_Record". I have created a readonly grid using "Main_Record". This grid has one column from "Related_Record as well. Like shown in below table column c data is from related record. This column as three rows (Its one to many relationship)

    ColumnA Column B Column C
    Data From Main Record Data From Main Record

    Data From Sub Record;Data From Sub Record ;Data From Sub Record (I have three rows from sub record)

    User wants this grid to be sorted by all columns.  First two column sorting is working fine by "SortField" properties of grid column. But as soon as I click on Third column I am getting error "Sorting can not be applied on one-to many relationship record field" 

    So, now I want this third column to be a custom record field of "Main_Record" hoping that sorting will work as expected

    Thanks for your attention

  • 0
    Certified Lead Developer
    in reply to Madhusudan Tripathi

    OK. I did some testing and did not get this to work. A custom record field does also not support a "group_concat" like behaviour. At least I did not get it to work in the time I had.

    So, if this requirement is a must-have, you could modify the process that adds/removes the sub record relationship in a way that it concats the values into a field in the main record.

  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    Thank you Stefan, for your time and efforts. Now I have some confidence to talk to business if we can skip sorting of sub record fields. If not then I will try to modify the data source itself and have all columns in one record.