Conditionally Render Nested Table in Drawer, When there are Rows in the Table
I have a Table Component (T1) with a drawer that displays another table T2) of related records.
I am trying to only display the drawer's table (T2) when there are actually related records (so some drawers will show the table (T2), and others will not).
I tried adding a rendering condition using the Table's (T2) Model Property of Has data rows, and also tried # of rows in model, but ther table (T2) still rendered.in the drawer.
The Source Model Tooltip for the render conditions indicated that it will use the rows in context unless there are no rows in context in which case it uses the first row in the model, which explains why it isn't working using my logic, but I am unclear as to an alternative approach to achieving my objective.
Any suggestions would be much appreciated.
I am using API V2.
I am trying to only display the drawer's table (T2) when there are actually related records (so some drawers will show the table (T2), and others will not).
I tried adding a rendering condition using the Table's (T2) Model Property of Has data rows, and also tried # of rows in model, but ther table (T2) still rendered.in the drawer.
The Source Model Tooltip for the render conditions indicated that it will use the rows in context unless there are no rows in context in which case it uses the first row in the model, which explains why it isn't working using my logic, but I am unclear as to an alternative approach to achieving my objective.
Any suggestions would be much appreciated.
I am using API V2.
Tagged:
2
Categories
- 7.9K Questions
- 926 Ideas
- 220 Discussion Categories
- 178 General
- 9 Community Feedback
- 3 Community Info
- 18 Knowledge Base
Comments
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 :-)