an issue with a record grid view will not sort a field

A Score Level 1
I have an issue with a column in a record list grid view. I have an element of the array that needs to correspond to another table using a lookup table and foreign keys, this element is a list of strings. so I created a expression rule and query rules to fetch the correct data. then in the grid I entered the rf!IdValue as the field,

the result was the the data was correct on the initial load but would not sort with the other data , remaining in the same rows instead of matching the other sorted rows.

I also tried adding the IdValue to the array that was returned from the expression rule. the results to this was when the sort changed the Id would move with them but the other values would not move. I have verified the expression rule is returning the correct values.

OriginalPostID-266891

  Discussion posts and replies are publicly visible

Parents
  • In similar cases where we need to show data from a table having references to some small lookups (less than 100 records), we use display cdts. If we are supposed to display data from a table having references to other transactional tables then using views/nested CDTS is a better approach.

    way to build grids using display cdts is

    1. Create a CDT with enough number of text,number,date fields as per your requirement
    like
    {
    text1,....textn,
    integer1,...integerm,
    decimal1...decimaln,
    date1...datex,
    datetime1..datetimey
    }
    2. use below logic to show your record in grid using display cdt.
    The advantage of using this approach is it will reduce number of calls by calling more data at once. however if you have veryhuge lookups go for view.
    load(
    local!records:rule!queryRuleOrEntityTogetTransactionalData,
    local!lookupDataForFieldn:rule!queryRuleOrEntityTogetLookupsForExisitingRecordField1(fn!index(local!records,"field1",null)),
    ........
    local!data:fn!apply(rule!costructDisplayCDT(_,local!lookupDataForFieldn,....),local!records)
    local!datasubset:(local!data,pagingInfo()),
    grid(local!datasubset)

    )
Reply
  • In similar cases where we need to show data from a table having references to some small lookups (less than 100 records), we use display cdts. If we are supposed to display data from a table having references to other transactional tables then using views/nested CDTS is a better approach.

    way to build grids using display cdts is

    1. Create a CDT with enough number of text,number,date fields as per your requirement
    like
    {
    text1,....textn,
    integer1,...integerm,
    decimal1...decimaln,
    date1...datex,
    datetime1..datetimey
    }
    2. use below logic to show your record in grid using display cdt.
    The advantage of using this approach is it will reduce number of calls by calling more data at once. however if you have veryhuge lookups go for view.
    load(
    local!records:rule!queryRuleOrEntityTogetTransactionalData,
    local!lookupDataForFieldn:rule!queryRuleOrEntityTogetLookupsForExisitingRecordField1(fn!index(local!records,"field1",null)),
    ........
    local!data:fn!apply(rule!costructDisplayCDT(_,local!lookupDataForFieldn,....),local!records)
    local!datasubset:(local!data,pagingInfo()),
    grid(local!datasubset)

    )
Children
No Data