Fetching selected columns from database

Hi Guys,

I am trying to implement a dynamic table. Below is the detail:

1. I want to display all the attributes from an entity in a list.

2. Want to fetch the records for the selected attributes from the list and display only those columns in a table. 


Note: The selected attributes will be dynamic


Thanks in advance.  

Hello Neha,

This is not possible by default, and trying to implement code to do this will be very complex.
You should take a look into components in the forge, like the DataGrid component.

Cheers!

Hi Eduardo, 

Data grid components provide the below listed features:

The features include:

  • Editing

  • Filtering

  • Formatting

  • Globalization

  • Grouping

  • Selection

  • Sorting

  • Virtual scrolling

This doesn't working as expected in this case. 

Thanks.

Solution

I didn't usw the data grid yet, but as the data is fetched through rest, If I am not mistaken, it can have dynamic columns... 

The simer way to have something server-side that can build columns dynamically would be a List of lists... This wouldn't be very practical (I already implemented it). 

It is easier to have a component that has JavaScript to build the HTML that receives a JSON with information about columns and data. 

But besides Data Grid, that is a fairly complex component, you may find easier components at Forge. A quick search lead me to these two:

https://www.outsystems.com/forge/component-overview/4926/dynamic-table-object

https://www.outsystems.com/forge/component-overview/3669/dynamictable

Cheers 

Solution

Eduardo Jauch wrote:

I didn't usw the data grid yet, but as the data is fetched through rest, If I am not mistaken, it can have dynamic columns... 

The simer way to have something server-side that can build columns dynamically would be a List of lists... This wouldn't be very practical (I already implemented it). 

It is easier to have a component that has JavaScript to build the HTML that receives a JSON with information about columns and data. 

But besides Data Grid, that is a fairly complex component, you may find easier components at Forge. A quick search lead me to these two:

https://www.outsystems.com/forge/component-overview/4926/dynamic-table-object

https://www.outsystems.com/forge/component-overview/3669/dynamictable

Cheers 

 Thanks Eduardo!