Announcements
Use Conditional Visibility in Views: Customize the list view by setting conditional visibility for each field or section based on whether the data is present. This can be achieved by setting the conditions directly in the list view settings or using JavaScript for more complex logic.
Create a Custom Display Form: Instead of using the standard list view, create a custom display form where you dynamically render only the sections that contain data. This can be done using Liquid templates or custom JavaScript, which checks if a field has data before displaying it.
Filter Empty Fields: Configure the view to filter out fields that are empty. In Dynamics 365, you can use fetch XML to create a view that only displays non-empty fields or create a custom view in Power Pages that omits these fields.
Use JavaScript for Dynamic Display: Add JavaScript to your Power Pages to check each field's value when the form is loaded and hide any fields or sections that are empty. This approach allows for real-time control over what is displayed.
{% fetchxml yourdata %}
// put fetch here
{% endfetchxml %}
{% if yourdata.results.entities.size > 0 %}
{% for result in yourdata.results.entities %}
{{ result.yourfieldnamesfeomfetchxml }}
{{ result.yourfieldnamesfeomfetchxml }}
{% endfor %}
{% endif %}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.