Render condition based on child records

Is this something that’s already been suggested? I have a table with a drawer of related records. It would be really cool to be able to render a drawer action based on whether a table row has any related child records.

Great idea! You can achieve this in the XML, someone else may know a different way –

Set a render condition for a specific field to != Null - blank value on your row action, then search by your field name to look for a section similar to this in your XML:

                          <rendercondition type="blank" fieldmodel="ModelName" sourcetype="fieldvalue" sourceproperty="hasRows" operator="!=" nosourcerowbehavior="deactivate" <b>field="FieldName__c"</b> value="null" enclosevalueinquotes="false"/>

Then replace the field name with either ChildName.records if it is a standard field or ChildName__r.records if it is a custom field (you can tell by looking at the child field on your field, if it says just Contacts do Contacts.records, if it says Contacts__r do Contacts__r.records)

So the resulting XML should look like:

<rendercondition type=“blank” fieldmodel=“ModelName” sourcetype=“fieldvalue” sourceproperty=“hasRows” operator=“!=” nosourcerowbehavior=“deactivate” field=“Contacts.records” value=“null” enclosevalueinquotes=“false”/>

I got this to work, let me know if you have any issues. :slight_smile: