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

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

Make Child table related Rows read-only based on the Parent table column value

(0) ShareShare
ReportReport
Posted on by

We have 2 tables with names Parent And Child. The Parent has One-Many Relationship with Child. Child Table contains 250-500 rows that related to each parent Item. We are implementing  the approval process on the Parent  item  using the power automate.  We have a requirement that we need to make the Child rows Read Only(Non Editable by users) based on the value of the Parent column(Workflow Status)  with  possible values Initiated, Approved, Rejected. Any suggestions or approaches on the same.

 

Thanks in Advance, 

Regards,

Tarun.

I have the same question (0)
  • Yock Profile Picture
    45 on at
    Re: Make Child table related Rows read-only based on the Parent table column value

    Maybe you can test the Business Process Flow stage, I remember the workflow can lock the column once the condition right

  • Verified answer
    eleung83 Profile Picture
    232 on at
    Re: Make Child table related Rows read-only based on the Parent table column value

    You have multiple options depending on the type of user experience you want to portray here, and what processes/users would be attempting to change the child rows.

     

    1. Javascript - You could have code running on the child form that would check whatever status field on the parent table you use to store the status, and then hide the ribbon buttons and all fields on the form. This would be the most custom code option, but it would block your users from editing the child records manually (excluding bulk edits and any editable subgrid editing) whilst allowing any other background processes to still be able to edit these child records

     

    2. Copy the approval status on the parent record to the child records (perhaps when the parent is approved), and check this copied value on the child record. Similar development required as (1) above, but a bit less coding effort to get the approval status field value (you would still need another process to copy the status from the parent records to the child). Same exceptions apply for bulk edit and editable grid edits

     

    3. Real time workflow. This would run whenever an edit is made to a child record, and would check the approval status field value that you have on the associated parent record. If the parent record approval status is whatever status you need to check for, then you stop the workflow with an error, so the user cannot continue with their changes. The downside is that this would be reactive the child record form looks like the user can edit it, but the workflow would block anyone (and any background process) from making changes. This requires zero code (just a real time workflow), but to the user it would initially look like they can edit a child record

  • Fubar Profile Picture
    8,232 Super User 2025 Season 2 on at
    Re: Make Child table related Rows read-only based on the Parent table column value

    Plugin, Workflow,  Flow, or move out of the users permissions scope. 

    Note the only real read-only is via deactivating the record (with an appropriate Status Reason set) or if not able to deactivate enforcing the readonly on update via a realtime plugin or workflow or moving the records to a different Business Unit.  (other ways like trying to set all the fields readonly can be worked around by the users).

     

    One way, on the child record create an appropriate set of Status Reasons under the Inactive State.  On update of the field on the parent record, loop the child records and set them Inactive with the appropriate Status Reason.  The loop & update of child records needs to be done via Workflow (with custom workflow activity), Plugin or Flow (only use Flow if it does not need to be done in real-time).

     

    Another way, similar to above is to loop the respective child records and change their owner field to Team in a Business Unit where the users do not have Write permissions to (but do have read permissions).  In this case you need to establish an appropriate Business Unit structure and not have all the Security Role permissions set to Global.

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…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 766 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 235

Last 30 days Overall leaderboard

Featured topics