Master-Detail form validation

If i were to create a master detail form app

Master = Person Table (form app)
Detail = Order Table (grid app)

How can i

  • limit total order rows <= 20 If Person.country = Counter X
  • limit total order rows <= 100 If Person.country = Counter Y
  • etc?

i am not sure how to achieve this since both are two seperate app and tables

Thanks for the pointers.

You need to set a global variable with the counterXY value. Then use this value in the onbeforeinsert or onafterinsert of your detail depending on your application logic.