Skip to main content
November 15, 2022
Solved

Show a text value instead of row id in an reag-only grid

  • November 15, 2022
  • 4 replies
  • 0 views

In the cloud database, a value with the row id is stored.

I have this read only grid, I want to change the row id value instead of another field of the row

In the following read-only grid image, the value of the row id "3" appears in the column "Grupo/Empresa"  I want to change that value to a text to facilitate identification

In this case the row id "3" belongs to "CORFOPYM QUITO"

In the read only grid should appear " "CORFOPYM QUITO" instead of "3"

Best answer by amans0009

1. you have to query from table (use a!queryEntity) to get the data in interface

2. store that value (data) in a local variable

3. in the grid column try this in value parameter ->  

index(
local!/*data's local variable*/.nombre,
wherecontains(fv!row[/*your int record field*/],local!/*data's local variable*/.id),
{}
)

4 replies

amans0009
November 15, 2022

if your record is related (record relationship) to the table's record that you've shown in the image , then you can choose fields from related record also 
as in this case you can use the field nombre from related record.
and if there is no related record then you can get the table's data from query and you can use index along with wherecontains function to get the work done  

danna3499Author
November 15, 2022

Is the second case (not a related record)

where should i do this query,  in the gridColumn oh the read-only grid?

what would be the expression??

amans0009
amans0009Answer
November 16, 2022

1. you have to query from table (use a!queryEntity) to get the data in interface

2. store that value (data) in a local variable

3. in the grid column try this in value parameter ->  

index(
local!/*data's local variable*/.nombre,
wherecontains(fv!row[/*your int record field*/],local!/*data's local variable*/.id),
{}
)

gopalk2865
November 16, 2022

Hi,  for column "Grupo/Empresa", are you able to find field "nombre" in your record type?