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.

validate all line items are from the same supplier?

Featured Replies

Hi All,

I guess I'm just rusty from not doing this for a while, but I'm trying to figure out how to do what should be a fairly simple validation. I have a table structure as follows:

Purchase Order -> Line Items -> Products -> Suppliers

There can only be one supplier per PO, and by selecting that supplier, the supplier info area filters a selection portal to only show items for that supplier. That selection portal is then used to populate the line items.

The problem arises if the user changes the supplier after there are already line items in the order. I could easily validate against changing the supplier ID field if there are existing related records in the line items table, but what I want to to is validate that there are no related line items having a different supplier than the currently selected supplier in the PO record. I guess I could do this by having a lookup field that pulls the supplier ID into the actual line items table and using a multi-predicate relationship to test that, but is there a way to do it without resorting to lookups or auto-enter calcs?

I've attached a file that shows what I'm trying to do.

Thanks,

Dana

Purchase_Orders_Copy.zip

  • Author

Thanks! That worked great. The only hitch is that it doesn't seem to refresh under certain circumstances (like if you delete the offending line item) But scripting the delete and adding a refresh window (flush cached join) fixes the refresh issue.

Thanks again,

Dana

I thought you wanted to validate the SupplierID field. For a visual indicator only, it can be much simpler:

ValidateSupplier2.fp7.zip

  • Author

No, validation was what I was going for... What I meant was the cached results cause the validation to trigger incorrectly after deleting a line item that doesn't match the supplier. I fixed this by adding the refresh window (flush cached join) in between the delete portal row and the commit steps.

Thanks again,

Dana

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.