Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7784 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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.

This topic is 7784 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.