Results 1 to 3 of 3

Thread: Possible to constrain a parent based on children data?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Smile Possible to constrain a parent based on children data?

    Hi,
    A "Which comes first? Chicken or the Egg?" question...

    Given:
    Parent Table INVT
    Child table Stock (has the field .Store and .Qty)


    I have a data aware view (gtAutomatic) where I want to put a filter where the user can dictate to get only INVT records with total .Qty of child Stock records matching to the filter criteria.

    Is this possible? Or the only way is to have a non-data aware gird* (onmanualload goes through each INVT then go through each child STOCK records)?

    thanks in advance..

  2. #2
    Join Date
    Feb 2009
    Location
    Stuart, FL
    Posts
    5,321

    Default Re: Possible to constrain a parent based on children data?

    you can use CONSTRAIN AS but be aware that this will require all records to be sent to the client and tested. if you have a large INVT db and only a few records selected that could be slow

    a better option would be to use SQL in case you are using a SQL database
    Michael Salzlechner
    StarZen Technologies, Inc
    http.://www.starzen.com

    IT Director at Balloons Everywhere

    Development Blog
    http://www.salzlechner.com/dev

    DataFlex Package Manager (aka Nuget for DataFlex)
    http://windowsdeveloper.com/dfPackage

  3. #3
    Join Date
    Feb 2009
    Location
    Peoria, IL
    Posts
    5,491

    Default Re: Possible to constrain a parent based on children data?

    Is this in a SQL database? If so you can setup a SQL Constraint to do this.
    Chuck Atkinson

    "No matter how confounding the case, Bob Worsley always finds the quaesitum."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •