Alpha Video Training
Results 1 to 20 of 20

Thread: Creating child records

  1. #1
    "Certified" Alphaholic
    Real Name
    Bill Belanger
    Join Date
    Sep 2003
    Location
    Caribou Maine
    Posts
    1,053

    Default Creating child records

    Can someone steer me to an explanation of how to create child records? I can't seem to find it anywhere. Do I do a post operation or an action script on saving a form that will create a new record in the child table, then populate the fields? I just want to be sure there's isn't a 1 step simple operation to do that I don't see.

    Thanks
    Bill Belanger

  2. #2
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Creating child records

    Hi Bill,

    Have looked at AlphaSports?

    What do you mean how do you create child records?

    I think you seem to be asking the question as to how the data gets into a child table, or have I got that wrong?
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  3. #3
    "Certified" Alphaholic
    Real Name
    Bill Belanger
    Join Date
    Sep 2003
    Location
    Caribou Maine
    Posts
    1,053

    Default Re: Creating child records

    Thanks Keith. Yes, I'm asking how to get data into child records. And yes, I've looked at Alphasports. Where are child records created?

    It seems when I created a set it used to allow me to create child records. It's been years since I've used Alpha. Is it explained anywhere in the help files? I can't seem to find anything in a search of the forum either. That's why I figured it must be easy and I'm just missing it.

    Bill Belanger

  4. #4
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Creating child records

    Hi Bill,

    Child records are created in the child table.

    First question, how have you created the link of child to parent. Are both fields the same? ie Type and length.

    Would you like to zip up what you have done and let us know what you want to happen.

    Alpha is like riding a bike, you just need to get back on and peddle.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  5. #5
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Creating child records

    Bill, you can create records in a table using scripts, or from the keyboard. It's not clear what you're talking about. Why not tell us what's going on and what you want alpha five to do? Describe the context in which you want to enter the new records. Tell us how you want it to work.

  6. #6
    "Certified" Alphaholic
    Real Name
    Bill Belanger
    Join Date
    Sep 2003
    Location
    Caribou Maine
    Posts
    1,053

    Default Re: Creating child records

    Thanks Tom. I see that in Alpha Sports there are two tables, invoices and invoice items. I want to do the same thing. I would like to create an invoice and show the line items in a browse below. I could probably have the browse display records filtered on the invoice number. But I also want to "post" new records to an inventory table. It looks like to me that I need to first create a new record, then populate the fields in that record with a script, probably an event on saving the parent record. I just wanted to be sure I had the right idea and that there wasn't a step that would copy the entire record to a new table.

    Bill Belanger

  7. #7
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Creating child records

    Hi Bill,

    When you mention the Inventory table, is that so you can subtract and add values to product quantities in hand?

    If that is the case look at the field rules of the child table in Alphasports.

    We would like to help but please give us more to work with.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  8. #8
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,687

    Default Re: Creating child records

    Quote Originally Posted by Bill@TrackerSystems.com View Post
    Thanks Tom. I see that in Alpha Sports there are two tables, invoices and invoice items. I want to do the same thing. I would like to create an invoice and show the line items in a browse below. I could probably have the browse display records filtered on the invoice number. But I also want to "post" new records to an inventory table. It looks like to me that I need to first create a new record, then populate the fields in that record with a script, probably an event on saving the parent record. I just wanted to be sure I had the right idea and that there wasn't a step that would copy the entire record to a new table.

    Bill Belanger
    Hi Bill,
    It almost sounds as though you are wanting to create matching transactions for your inventory table that will reflect the line items you are shipping in the invoice. When you say "new records" then you are talking about an append operation not a post (whether operation or field rule). If the records already exist in the inventory table and you merely want to update the quantities on hand as Keith said, then you want to post to those matching records which could be done in a field rule set in your invoice line items table.

    We need more info! My inventory is done with matching transactions created for each shipment, because I have to split the total amount shipped into percentages for the different inventory items used to get my quantities.
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

  9. #9
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Creating child records

    I want to do the same thing. I would like to create an invoice and show the line items in a browse below. I could probably have the browse display records filtered on the invoice number.
    This much is dead easy. Create a set. Invoice headers as primary and line items linked one to many as child. Base form on the set. Put fields from the primary table on form. Use embedded browse to display child table records. Surely you remember this, right? Am I missing the point of your post?

    Perhaps the tutorial in the help file on "using tables in a set" will bring back some memories.
    Last edited by Tom Cone Jr; 05-17-2008 at 05:56 PM.

  10. #10
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Creating child records

    Bill said:
    But I also want to "post" new records to an inventory table. It looks like to me that I need to first create a new record, then populate the fields in that record with a script, probably an event on saving the parent record. I just wanted to be sure I had the right idea and that there wasn't a step that would copy the entire record to a new table.
    This makes no sense to me, sorry. In the invoice the quantity ordered is usually a field in the line items table, not the invoice table. That's true in AlphaSports which you say you want to mimic. I'm baffled why new records in the inventory table would be needed?

    Are you simply trying to adjust the quantity on hand ? If so you need to CHANGE a record in the inventory table, not ENTER a record, right? If you want to adjust the quantity on hand in the inventory table consider using a post FIELD RULE defined in the invoice_items table that subtracts the quantity ordered from the quantity in inventory? More details are needed if these ideas don't get you going.

  11. #11
    "Certified" Alphaholic
    Real Name
    Bill Belanger
    Join Date
    Sep 2003
    Location
    Caribou Maine
    Posts
    1,053

    Default Re: Creating child records

    Thanks guys. Unfortunately "inventory" in this situation is not like a merchant who catalogs items for sale. This is a freezer plant. Customers send pallets or totes (huge tubs of veggies) of product to them to keep them frozen until needed for shipment to other customers. They could be totes of blueberries, pallets of frozen french fries, who knows. These products go into inventory, and then they're gone. The product is date coded, they may be McDonalds french fries but with the date code, they are a unique product. They will never be inventoried again. I don't need a bunch of empty records in an inventory table.

    This is what I'd started in Filemaker (about 1/3rd done) before changing my mind and re-starting it in Alpha, just to give you an idea of what I'm doing.

    http://64.223.230.119/fmi/iwp/cgi?-db=acp&-loadframes

    login as admin, no password.
    Look at Incoming

    Attached is where I am in Alpha.

    Bill Belanger

  12. #12
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Creating child records

    Bill, I'll be glad to take another look once I have a clue what you need. In meantime I'll sign off hoping that someone more intuitive than me can figure out what you're asking about. -- tom

  13. #13
    "Certified" Alphaholic
    Real Name
    Bill Belanger
    Join Date
    Sep 2003
    Location
    Caribou Maine
    Posts
    1,053

    Default Re: Creating child records

    I was asking how to create new records in a child table when I add a record in the parent table. Posting only modifies a field in a matching record. A copy records operation would be nice, but it wants to create a new table. I think append unique records might work using a unique transaction code for every new parent record.

    Thanks
    Bill Belanger

  14. #14
    "Certified" Alphaholic
    Real Name
    Bill Belanger
    Join Date
    Sep 2003
    Location
    Caribou Maine
    Posts
    1,053

    Default Re: Creating child records

    Yup, that worked. Thanks for the help guys.

    Bill Belanger

  15. #15
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,687

    Default Re: Creating child records

    Quote Originally Posted by Bill@TrackerSystems.com View Post
    Yup, that worked. Thanks for the help guys.

    Bill Belanger
    Glad you got going in the right direction. Your model seems to be one of "warehousing" which would be more descriptive than "inventory". Are you going to leave this link open? - I'd like to look at it some more.
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

  16. #16
    "Certified" Alphaholic
    Real Name
    Bill Belanger
    Join Date
    Sep 2003
    Location
    Caribou Maine
    Posts
    1,053

    Default Re: Creating child records

    Go for it. I'd Appreciate any suggestions.

    Bill Belanger

  17. #17
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,388

    Default Re: Creating child records

    This sounds a lot like something I have working.
    We have a customer that has many customers, and needs a place to store product.
    This customer provides us an ASN, that includes their customer's ID, an item number or numbers, quantity, and a skid id.
    We then save that information, along with a binbay id (where we actually put the skid).

    Some of my terminology might be slightly different, but am I on the right track ?

  18. #18
    "Certified" Alphaholic DaveM's Avatar
    Real Name
    Dave Mason
    Join Date
    Jul 2000
    Location
    Hudson, FL
    Posts
    6,024

    Default Re: Creating child records

    Bill, I tend to do it one of 3 ways. If using tabs or- one can just drag fields from child to parent and use. I prefer to create a form within the set, but on the child table and then place the form in the parent form including possibly an imbedded browse. Other is to create same but call it from main form, usually over the main form usually with a button push.
    Dave Mason
    dave@aldausa.com
    Skype is dave.mason46

  19. #19
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Creating child records

    You guys realize this is a ten year old thread?
    There can be only one.

  20. #20
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,687

    Default Re: Creating child records

    It seems like searching for desktop posts these days is always going to find old threads. So bumping an old one is not always a bad idea.
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

Similar Threads

  1. Replies: 17
    Last Post: 10-31-2007, 10:00 PM
  2. Can't add new child records because parent grid has no records
    By andi in forum Application Server Version 8
    Replies: 9
    Last Post: 07-11-2007, 04:19 AM
  3. Replies: 13
    Last Post: 03-14-2007, 06:59 PM
  4. Creating Child Records
    By Bob Flanagan in forum Alpha Five Version 5
    Replies: 4
    Last Post: 06-18-2004, 09:39 AM
  5. Creating a new record in a child table
    By lionel louviere in forum Alpha Five Version 5
    Replies: 4
    Last Post: 04-21-2004, 10:55 AM

Bookmarks

Posting Permissions

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