web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Show count of connecti...
Power Apps
Unanswered

Show count of connections in Header

(0) ShareShare
ReportReport
Posted on by 1,168

Hi,

I want to show the number of connections a Contact record has in the Header Section of the Contact Form.

I went down the path of creating a Number column with rollup functionality but couldn't seem to find connections to be able to perform a count on them. Also want to show a zero if there are none.

Any ideas how I might achieve this? Or is there a better approach?

I dont want users having to click on the Related then Connections tab just to know if there is any.

Thanks in advance

Todd

I have the same question (0)
  • Jonathan Manrique Profile Picture
    2,687 on at

    Hi @Tango 

     

    You can add the Connections grid in a session and hide it from the form if you don't need it.
    Then create a number field and use Javascript to count the number of records associated with the grid.

     

    function obtenerConteoSubgrid(executionContext) {
     setTimeout(function () {
     var formContext = executionContext.getFormContext();
     if (formContext !== null && formContext !== undefined) {
     var nombreSubgrid = "nombre_del_subgrid"; // Reemplaza con el nombre real de tu subgrid
     var conteo = formContext.getControl(nombreSubgrid).getGrid().getTotalRecordCount();
     alert("Número de registros en el subgrid: " + conteo);
     }
     }, 15000); // Espera 15 segundos antes de ejecutar la función
    }
    

     

     

  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    Hello,

    There are multiple ways to address your scenario:

    1. You can create a regular (not rollup) whole number field and develop the set of plugins that will -  on Create  event of the record itself populate it with 0 and on create/delete events of connections perform the recalculation of that field.

    2. Use the same approach with the field and use Power Automate Flows to perform the recalculation. You will have to think about how to address the scenario when the connection record is deleted but I have an idea of how to make it happen cause I was doing something similar.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard