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.

Relationship issue displaying items in portal

Featured Replies

I have a Clients table, a WorkOrders Table and an Invoices table in my database.

Relationship 1:

Invoices::INVCLIENTID = WorkOrders::WOClientID

Invoices::INVID "not=" WorkOrders::InvoiceID

Example of issue:

the invoice layout has two tabs..

INVOICE: allows me to choose the client and shows me an empty portal where the work orders belonging to this invoice will appear after i add them

UNBILLED WORK ORDERS: has a list of all work orders that exclude work orders that have (WORKORDERS::INVOICED = "yes")

Example:

On Invoice005 i go to the "UNBILLED WORK ORDERS" tab and click the button on the portal row with the desired work order that will belong to that invoice. that button script copied the current InvoiceID and paste's it on the WorkOrders::InvoiceID (this action allows the work order to appear on the "INVOICE" tab for calculating the total). Once that work order is added to the invoice, i see it on the invoice tab, and it is removed from the "unbilled work orders" tab.

Problem:

this relationship works fine, except that when the following month comes around and i need to invoice, work orders that where invoiced on invoice005 are visible for invoice006 which means i can make a mistake and bill a client for the same work order twice.

i know what i need to do, i just cant figure out how to tell filemaker to do it.

i want my relationship to say:

"A work order with the InvoiceID "INV005" will appear in INV005 and not be available for selection to another invoice"

which seems true but only when i have inv005 opened.

the problem is that there is nothing in the relationship that says

"if there is text inside of field WORKORDERS::INVID, then do not display this work order in any other invoices"

the field that says if it was invoiced or not is "WORKORDERS::Invoiced" which has a Yes/NO in it.

please help and im sorry if i did not communicate the issue very well

Define a calculation field in the WorkOrders table =

Case ( IsEmpty ( InvoiceID ) ; ClientID )

Use this field to match the ClientID in Invoices.

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.