Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Found-sets of Invoices & related LineItems

Featured Replies

I'm working on a script to import Invoices and their related LineItems from a small, "staging" database to my main database. The staging database contains Invoices and LineItems tables, just as does the main database.

[Note: I'm using relational terminology ("database", "table") but this IS a FM6 database]

The script, running in Invoices_Main.fp5, imports from a previously-created found-set in Invoices_Staged.fp5. No problem there. But then I want to import into LineItems_Main all LineItems_Staged records that are related to records in the found-set of Invoices_Staged.

- - -

I guess my problem really isn't about Importing as much as it is this: given a found-set of Invoices, how do I then create a LineItems found-set containing all records related to records in the Invoices found-set? (Once that's done, it's trivial to import just the records I want)

Thanks for any hints -

Chap

You could loop through the found set in 'invoices' and set a global text field to a return delmited list of the invoice IDs.

Through a relationship from that global to the items file (on invoiceID) and a Go To Related Record script step you'll create a found set in the invoice items file that matches all items of all the invoices in the found set in the invoices file.

If you don't want to create a new relationship for this, you can script it too by again looping through all the invoices in the found set, taking their ID, running a find script in the items file that extends the found set with items that match the temp invoice id.

  • Author

Thank you! That did exactly what I wanted. (I went with option 1 - creating the new relationship.)

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.