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.

Printing portal rows - but not all of them

Featured Replies

  • Newbies

Been lurking here for a while, and have learned quite a lot from the knowledgeable people here. It's credit to the programmers at FM and the people here that I've never found a question I couldn't find an answer for - until now!

I have an application to automate a repair shop. On the printed invoice that it generates, there is a portal for the parts/supplies that are used in the repair. Some of the parts the customer pays for, but some are simply included in the cost of the repair.

The problem is that on the invoice, the customer doesn't need to see a whole list of parts that were used - just the ones that he will be paying for. The rest are there for the internal use of the shop - inventory control, etc. On any given repair there might be 4 or 5 parts that the customer will pay for, and more than a half-dozen they won't.

I've been wracking my brain trying to figure out a way to keep those non-billable parts from printing in that portal. They don't have a price associated with them, so the problem isn't differentiating - it's just in getting the app to NOT print those items.

Any ideas?

-=[ Grant ]=-

Greetings Grant,

This would be a good place to have the portal use another relationship to the line items where the relationship is filtered by some condition. You might have a specific part number that could be used to indicate those items that are shop supplies, or you might just use the condition where only Price > 0 are shown. In either case, you'll need some field on the parent (Invoice) side to hold that filter. A filter field like this is usually a globally stored field, that's populated with the correct value. The relationship then might look like:

Invoice <=> Line Items to Print =

Invoice::Invoice# = Line Items to Print::Invoice#

AND Invoice::gZero < Line Items to Print::Price

Where gZero is a global number field populated with a '0'.

Notice however, that if your system handles returns with a negative Price, this would fail to show those returns. If this could happen in your environment, you might try a filter on a certain Part Number, or Part Category instead.

  • Author
  • Newbies

Thanks for the idea! I've done that, and it works - but I've run into a problem and I can't see the cause.

Let's say the invoice has 4 billable items. It's showing 4 items, but they're all the same, and are the value in the first found item.

For instance: Line 1 in the portal is for Product 1 - and so is Line 2, and Line 3, and Line 4!

What'd I do wrong?

-=[ Grant ]=-

  • Author
  • Newbies

Whoops - figured out that I needed to make the fields in the portal come from the new occurrence of the table, not the old one.

Silly me! :)

-=[ Grant ]=-

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.