117
Views
3
Comments
[OutSystems Data Grid] List within Data Grid to represent one to many relationship
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
Application Type
Reactive
Service Studio Version
11.53.14 (Build 61243)

I would like to be able to represent a one-to-many relationship using the OutSystems Data Grid. Basically, I want one row for each unique entry in the parent entity, with a column that has a list of all the associated entries in the child entity. Can anyone help me with this? Is this even possible?

2020-08-05 09-00-16
Gabriel Lundgren

Hello @Charlie Highum,


Can you please give us more details of what you wish? 


Thank you,

Gabriel Lundgren

UserImage.jpg
Charlie Highum

I have a one to many relationship of Car Companies and their Models that I would like to represent using a Data Grid. The Car Companies entity is a list of different car companies with other information about them such as year founded and headquarters. The car models entity has an attribute that is the Company Identifier, as well one different car model per row. Within the Data Grid, I would like each row to represent one unique car company, and then have one column that would contain all of the car models for that car company in a concatenated list most likely. I have included a screenshot of what this would look like if I made it in Excel. Let me know if you need any more clarifying information.

Thanks,

Charlie 

1toMany.png
2022-11-12 11-28-30
Gonçalo Martins
Staff

Hi @Charlie Highum,

By the image you're showing, that doesn't seem to be something that should be handled by the Data Grid itself, but by the query that is bound to it since you show two columns where the second one by your description is a text resulting from a comma-separated list of another column. 

The other way is to try the most usual approach when working with a spreadsheet:

Cheers,
GM


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