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
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.
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.
the same procedure with multiple entities
then I must also give the Id ?
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.
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
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 RegardsTousif Khan
thank you @Tousif Khan, @N_G G, @Mostafa Othman and @ Kay Lun for all the help ;)
@Kay Lun ,
if at all possible, the ArrangeData action should be used from OutsystemsDatagrid module, rather than a generic JSONSerialize.
Dorine
Hi Dorine,
Is that mean, I could skip the JSONSerialize, and pass the structure list to the Datagrid module, and do the arrangeData there ~?
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.
found it, good to know
Thanks :)