How to highlight changes in read only grid

Certified Associate Developer

Hello, I have a doubt and I am unsure how to proceed.

 

I have an interface where the individual record rows are displayed in a read only grid where I am using the FK of another table to filter and display only those audits for a specific record.

The requirement is to display a different background color in the read only grid of the values in the row based on previous entries. For example

 

FKID Name Temp Approved
1 Tim 20 No
1 Timmy 22 Pending
1 Timmy 22 Yes
1 Timmy 23 Retired

Timmy, 22 and pending are highlighted in the second row because they differ from the first entry.

Yes is highlighted in the third entry due to being different than pending.

23 and retired are highlighted because they differ from previous also.

I have a record query as below and I feel I need to compare the fv!row[currentValue] against the indexed local data somehow but I am not sure how to proceed.

a!localVariables(
  local!data: a!queryRecordType(
    recordType: 'ADtable',
    fields: {},
    filters: a!queryLogicalExpression(
      operator: "AND",
      filters: {
        a!queryFilter(
          field: 'recordType!aDtable.fields.ForiegnKeyID',
          operator: "=",
          value: ri!recordID 
        )
      },
      ignoreFiltersWithEmptyValues: true
    ),
    pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 1000)
  ).data,
GRID INFO....
            a!gridColumn(
          label: "Name",
          sortField: fv!row['recordType!ADtable.fields.['Name'],
          value: fv!row['recordType!ADtable.fields.{'Name'],
          backgroundColor: index(
            contains(local!data['recordType!ADtable.fields.['Name'],fv!row['recordType!ADtable.fields.['Name']),
            "#FFD260",
            null()
          )
        ),



  )
)

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data