February 10, 200818 yr I have two tables which are related. The Child table had the ID number of the parent table to link it. I would like to create a button the parent tables layout that would check to see if there was a related record and if there was to open it and if there was not to create one and then open it. At this point there will be only one record related. I have created this a a separate table because it is also related to another parent table. Can anyone help me with the script I might use on a button to do this?
February 10, 200818 yr Go to Related Record [ From table: “child”; Using layout: “child” (child) ] [ Show only related records ] If [ Get ( LastError ) = "101" ] Set Variable [ $Parent; Value:parent::id ] Go to Layout [ “child” (child) ] New Record/Request Set Field [ child::parentid; $Parent ] Go to Layout [ original layout ] Go to Related Record [ From table: “child”; Using layout: “child” (child) ] [ Show only related records ] End If
February 14, 200818 yr I have a similar question. I made a report layout on a db to track inventory. As it is now, I create my POs/invoices, then separately create a record in the inventory table for any kind of inventory that isn't already in there. For example, if I write up an invoice for Converse - Men's shoes (converse being in the field SHOE and men's being in the field TYPE) and there is a record in the inventory table that has Converse - Men's, it will perfectly track that inventory. On the other hand if I would then create a purchase order for Converse - Children's, and there is no Converse - Children's record in the Inventory table, I would have to create it to track those shoes. What I would like to do is have that record in inventory be created automatically if, and only if, it doesn't already exist. I have included the relationships I set up so far. Thanks.
Create an account or sign in to comment