36
Views
7
Comments
[OutSystems Data Grid] Display multiple tags in a Datagrid column
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
Application Type
Reactive

I have a requirement to create a table column that displays multiple tags for each entry. The column should show at least five tags, and if there are more, they should be shortened with an additional tag (e.g., "+7 …"). This "+7" tag should be clickable to open a modal menu. Also multi-select filters would be a helpful addition.

Would storing tag text as a comma-separated string in the database be a good approach for generating such a column? Or is there a better way to structure the data for optimal performance and flexibility? Any suggestions would be appreciated!

2022-11-12 11-28-30
Gonçalo Martins
Staff

Hello @Karthik Santosh 

To make collaboration more efficient, please share a sample oml with your use case so the community members don't need to invest extra time trying to replicate it as well as what have you tried so far.

Cheers,
GM

UserImage.jpg
Karthik Santosh

Hi @Gonçalo Martins

Unfortunately, I do not have the liberty to share the .oml file since it's a client-owned file and I haven’t had the chance to test it in a personal environment yet. Apologies for the inconvenience caused, though it would be of great help if explained through words as well!
Thank you!

2023-03-13 10-26-05
Sriyamini

Hi,

Actually storing tags as a comma-separated string in the database may seem like a immediate solution, but it have lot of limitations because searching, filtering, and  managing tags much harder as the data grows. 

A better approach is to structure the data using a many-to-many relationship with a separate Tags table. if you add as many-to-many relationship it makes faster searches and filtering without messy string operations and makes it easier to manage and update individual the tags. It supports efficient multi-select filters for users to refine their search. 

For your UI requirements (showing the first 5 tags and a +X more expandable option), you can fetch the first 5 tags and dynamically load the rest when clicked.  You can have table like

  • Entries Table (stores each main entry)
  • Tags Table (stores unique tag names)
  • Entry_Tags Table (links entries and tags for flexibility)

This may help your issue.

Thanks,

Sriyamini J


UserImage.jpg
Karthik Santosh

Hi @Sriyamini

Thank you for the explanation. Your approach makes sense, and I can see how it improves search and filtering efficiency.

Could you kindly elaborate on the details on how to implement this? Specifically, how to create, store, and retrieve tags using this structure in Datagrid? We can use dropdown tags in a regular table, but how can we implement them in a Datagrid?

2026-01-28 16-57-48
Mihai Melencu
Champion

Hi @Karthik Santosh ,

Should this column be read-only?

UserImage.jpg
Karthik Santosh

Hi @Mihai Melencu

It should have a functionality where clicking on it opens a modal, allowing users to add more tags by selecting text in the modal. So, I assume it would be Read-Write.

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