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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Update parent row with a message if there are no related rows in the subgrid

(0) ShareShare
ReportReport
Posted on by

Hi, has anyone used power automate, cloud flows to check the number of rows in a subgrid, so check there are a number of child rows, and if there is less than one, the put a message on the parent row to say 'You need to add a ... (related row)'

If I get the 'list of rows' using power automate and a get the number of those rows with the expression: length(outputs('List_rows')?['body/value']), how could I then put a message, like a warning on the parent row? 

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi dsammied,

    You can create a new text field in parent entity, then use 'Update a row' action to update the field with the message.

    https://docs.microsoft.com/en-us/power-automate/dataverse/update 

    But it's impossible to achieve it through power automate if you want to show alert message in the form, just like following screenshot:

    pastedimage1634098629478v1.png

    You need use setFormNotification() function in js code:

    setFormNotification (Client API reference) in model-driven apps - Power Apps | Microsoft Docs

    Count related records through is:

    Count Total Subgrid Records in Dynamics CRM using JavaScript – Passion Dynamics (passion4dynamics.com)

    Or you can create a rollup field to count related reords:

    Count the number of related child records using a Rollup field – Passion Dynamics (passion4dynamics.com)

  • dsammied Profile Picture
    on at

    Thank you, using the notifications needs to be easier! rather than writing JS and web resource - I'm not an expert at JS and find writing a web resource takes quite a long time for me.

  • Community Member Profile Picture
    on at

    Hi dsammied,

    If you don't want to write js code, you can refer following link to download Alerts4Dynamics app:

    Alerts-Notifications Dynamics 365-Alerts4Dynamics (microsoft.com)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
#ManoVerse Profile Picture

#ManoVerse 93

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 62 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans