54
Views
11
Comments
Grid sort

Hello I need help, 

I have the problem that I should use Grid, I managed it somehow but it shows me all the data including the IDs. How can I display only certain data

UserImage.jpg
Kay Lun

Hi Alexander,

The easiest way to do is to create a structure with the selected column for your data grid


Then use the dataAction, to map the aggregate result to the structure.


After that, convert that into json, and use it in your grid.



Hope this help.

2020-11-25 10-45-32
Mostafa Othman
Champion

Hello Alexander,

You can create new structure into data tab including only attributes you want to display and make output data type of your data fetch action using this structure you created.

Otherwise you can drag and drop only columns you want to display to grid.

UserImage.jpg
Alexander Eder

the same procedure with multiple entities 

then I must also give the Id ? 


UserImage.jpg
Kay Lun

Hi Alexander,

When you assign the structure with the aggregate data, you could choose what data you need from your aggregate to create the corresponding attributes inside the data action.

Hope this could solve your problem.

2021-10-01 12-43-46
N_SG

Hi @Alexander Eder,

By looking at your screenshot , i guess you are using DataGrid. Correct me if i am wrong.
You might have used Columns in page to display the records, and probably bind the attribute  to display in page.
If you do not want to display the ID attribute information, you can remove the column where the ID attribute is bound. 
In the example below, I am showing the ID, FirstName, and Lastname in the screen. If I do not want to show the ID, I can delete the column where the ID attribute is bound. 
Hope it helps!
Regards

N_G

2023-10-21 19-42-11
Tousif Khan
Champion

Hi @Alexander Eder 

I have created a Sample for you where I am fetching data from an aggregate where we have  join between two entities,

You can refer to that for the Use case

Sample - https://personal-ejuytnht.outsystemscloud.com/Sample_OS/Grid 

Best Regards
Tousif Khan

Sample_OS_Grid.oml
UserImage.jpg
Alexander Eder

thank you @Tousif Khan, @N_G G, @Mostafa Othman and @ Kay Lun for all the help ;)


2021-09-06 15-09-53
Dorine Boudry
 
MVP

@Kay Lun ,

if at all possible, the ArrangeData action should be used from OutsystemsDatagrid module, rather than a generic JSONSerialize.

Dorine

UserImage.jpg
Kay Lun

Hi Dorine,

Is that mean, I could skip the JSONSerialize, and pass the structure list to the Datagrid module, and do the arrangeData there ~?

2021-09-06 15-09-53
Dorine Boudry
 
MVP

no, there is a server action called ArrangeData in the OutsystemsDatagrid module, this takes a list and returns JSON, it's output should be passed to the grid.

It also serializes your list's data, just like JSONSerialize, but does a bit more than that, it also holds some meta data at the bottom below the data, that tell the grid component more information about the data types of your data.

Dorine

UserImage.jpg
Kay Lun
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.