Dynamic Table Record

Dynamic Table Record

  

Hi,

I have a scenario where i want to have a dynamic table record using 2 entities - one with data and another with meta data for column naming that are populated by users that don't have access to outsystems environment

Example:

Data Entity

FileId
col1
col2
col3
col4
col5
1
Ferrari
458
12345


1
Tesla
Model S
54321


1
Porsche
911
12321


1
Aston Martin
Vanquish
54453


2
Atr1
Atr2
Atr3
Atr4
Atr5
2
Atr6
Atr7
Atr8
Atr9
Atr10


Meta Data Entity- Column Naming Data


FileId
col1
col2
col3
col4
col5
1
Brand
Model
Plate


2
ColName1
ColName2
ColName3
ColName4
ColName5


Expected Output for FileId 1:

Brand
Model
Plate
Ferrari
458
12345
Tesla
Model S
54321
Porsche
911
12321
Aston Martin
Vanquish
54453


Expected Output for FileId 2:

ColName1
ColName2
ColName3
ColName4
ColName5
Atr1
Atr2
Atr3
Atr4
Atr5
Atr6
Atr7
Atr8
Atr9
Atr10


So my main goal is, when rendering this table record based on a selected FileId



Is there a way of accomplish this behaviour ?



Hello João,

Yes, this is feasible.

If the number of columns is fixed, you can even use a Tabele Records. 

At a first glance, you would have to put expressions in the header, filled with the items of the list of the aggregate with meta. Than, just set the expressions in the line to the correct columns in the aggregate that fetch the data itself.

If you want to show less columns than the maximum possible, it is a little bit trickier, but feasible also.

Cheers,

Eduardo Jauch