Conditionally Render Nested Table in Drawer, When there are Rows in the Table

Hi Cookie Monster, thank you for the good question. We played around with render conditions in drawers on a V2 page, seems like the context can’t be taken into account, hence the render condition doesn’t provide the preferred result, like you said. There are probably different ways to achieve what you need, we found a quite quick way to make it work if you happen to use child relationship fields in the Table T2 in the drawer. For example your Table T1 shows a list of Accounts. The drawer contains Table T2 which shows related Opportunities (can be a different model). You could add a Child relationship field “Opportunities” to the Accounts model. You would also add a UI-only field to your Accounts model and set it up the following way:

Name: NumberOfOppsChildRecords
Display Type: Formula
Formula Return Type: Number
Formula: {{Opportunities.totalSize}}

This UI-only field will show the number of related Opportunities for each Account. Now if you go to Table T2 in the drawer, you can create a render condition that checks if the field “NumberOfOppsChildRecords” (in the Accounts model) is greater than 0. This works, because checking the amount of child records doesn’t need any context. Hope this is helpful for you :slight_smile: