Skip to main content
May 16, 2023
Question

Dynamic grid column based on a one-to-many relationship

  • May 16, 2023
  • 8 replies
  • 0 views

Hi there,

I've got a business needs where I have 2 records types (let's call them RT1 and RT2). RT1 has a one-to-many relationship with RT2 and I need to display a grid where my row would be RT1, in which the first 5 columns would be property of RT1 while the following columns would be dynamically added based on possible values of RT2, this mean the number of columns would be equal to the number of properties of RT1 + the number of possible values for RT2.

This could give something like : 

Name Color Brand Model Places Feat1 Feat2 Feat3 Feat4 Feat5
XYZ Blue Ford GT 2 1000 200 500 1500 600
ABC Red Mazda CX-9 7 2500 3000

What would be the best architecture to build that?

    8 replies

    mathieud0001
    Brainy
    May 16, 2023

    I personally would go with a master detail. So when you select a row in the RT1 sourced grid, it would pop another grid under it with the contents of the related records which you can than fill out.

    stefanhelzle0001
    Brainy
    May 16, 2023

    All UI components in Appian can be made dynamic. So, well, if that UI has to look like this, then a normal grid should do it.

    mathieud0001
    Brainy
    May 16, 2023

    True. I proposed this solution because I had no way of knowing if the child elements would be the same for all the parent elements and also how many child elements there were in total (possibly making the grid stretch horizontally past the width of the page).