cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

I want to create a Business Rule based on a Child Table

I have a Parent Table named "Request" and a child table named "Tasks".  The relation is  1 Request : N Tasks.  There is a "Request Status" field in the Request table, on which I want to enforce a business rule as follows

=> If at least any one of the Tasks related to the request is  "Open", then "Request Status" cannot be "Completed" .

 

If this is not possible is there a work around?

 

I am unable to find a solution for this. Any help is much appreciated. 

 

Thanks...

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisPiasecki
Dual Super User
Dual Super User

Hi @Anonymous,

 

One way to achieve your business logic is to add a whole number column to Requests that represents the Count of Open Tasks. A business rule can then check whether the value is greater than 0.

 

To keep the count up to date, you can use a Dataverse workflow on the Task table to increment or decrement the count on the Request table whenever the Task status changes.

 

Here is a similar example from CRM 2011 but still holds true today. 

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

2 REPLIES 2
ChrisPiasecki
Dual Super User
Dual Super User

Hi @Anonymous,

 

One way to achieve your business logic is to add a whole number column to Requests that represents the Count of Open Tasks. A business rule can then check whether the value is greater than 0.

 

To keep the count up to date, you can use a Dataverse workflow on the Task table to increment or decrement the count on the Request table whenever the Task status changes.

 

Here is a similar example from CRM 2011 but still holds true today. 

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

Anonymous
Not applicable

Hi @ChrisPiasecki,

 

Thank you so much, this is what I was looking for.

 

Regards,

Raj

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Users online (3,468)