Consider a scenario where we have two entities: Books and Chapters, with a one-to-many relationship (i.e., each book can have multiple chapters). I currently have a read-only grid that displays records based on the Book entity. One of the columns in this grid is called "Chapters", which displays all associated chapters in a bulleted list.
Since a book can have more than 10 chapters, I'm currently fetching all chapters into a local variable and indexing them based on the Book ID to display in the corresponding grid row.
This approach works fine for now. However, I'm concerned about performance if the chapter count increases more than 5000
Does anyone have suggestions on how to handle this scenario more efficiently?
Discussion posts and replies are publicly visible
HI. If your record "book" has a one-to-many relationship with "chapters", you can try this to display it in a grid.
Hi osanchea . Thanks for suggestion. But as i mentioned, books can have more than 10 chapters and this method limit related record to 10 items.
Hi Barbosa ,You can do it as osanchea to display in grid for a limited items.It's not a best practice to show huge numbers of items in a single grid column, yes you can have n number of chapters per book, ultimately you cannot show it in a record list as a single column, instead you can show it in a new record view, eradicating difficulty of viewing such huge records. You will have a space constraint blocking you to display multiple records: https://docs.appian.com/suite/help/25.1/sail/ux-grids.html#introduction (Check Don'ts).Always check your grid view is intuitive and readable....Hope this helps you!!!
Hi Varun Teja Gurrapu .yeah i agree. I thought of showing only 2 chapters a time with expand icon. So that user can see all chapters on clicking icon if needed. If i follow the above suggestion, user cannot see more than 10 chapters.
Try a tree view style component instead and see how that works, I have used this before for similar use cases ...
Tree View Component
You can also nest the data using Rich text as well.