August 5, 200322 yr I have several records in inventory.fp5 that I want to link to invoices.fp5 by invoice_id. I want to be able to run the script to do this within the database purchase_orders.fp5. The records in inventory.fp5 that are to be updated with a new invoice_id must satisfy two conditions, 1) inventory.invoice_id is blank, 2) inventory.project_id = purchase_orders.project_id I've never had to update fields within multiple records using filemaker before and I'm not sure how to go ahead with it. Thanks for any help.
August 5, 200322 yr Hi, I suppose there is a relation between the project_id in purchase_order.fp5 and project_id in inventory.fp5. If not you could define one. With this relation you could display all inventory records for a given project_id in purchase order through a portal. After generating a new invoice_id in invoice.fp5 the new invoice number could be temporarily stored in a global field in purchase_orders.fp5. Let's call that one g_invoice_id. You could then loop through the inventory records with: goto portalrow [first] loop if [is empty(Relation::invoice_id] set [Relation::invoice_id, g_invoice_id] end if goto portalrow [next, exit after last] end loop Does this make any sense? Regards, Ernst.
Create an account or sign in to comment