Skip to main content
omkaro0002
Known Participant
April 29, 2022
Question

Need to increment serial number in read only grid?

  • April 29, 2022
  • 2 replies
  • 1 view

Need to increment serial number in read only grid as to use in first column. If some of the entries been get deleted then the serial numbers be like,, 1,2,3,4,5.....

2 replies

harshitb6843
April 29, 2022

You can use fv!index while looping. 
Or if it is a readOnly grid, then you can use enumerate() function. 

omkaro0002
Known Participant
April 29, 2022

a!gridField(
  label: "Table List",
  labelPosition: "ABOVE",
  data: 'recordType!TableName',
    columns: {
      a!gridColumn(
        label: "S.No.,
        sortField: '',
        value: "",
      ),
      a!gridColumn(
        label: "Name",
        sortField: 'name',
        value: fv!row['recordType!Table.fields.name']
      )

},
)

In this grid listing I have to add serial number to the first column not the ID from the table.