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.

yet another portal looping problem

Featured Replies

I have a database that does an invoice. The list of items in the invoice is a portal to a listitems DB which is in turn related it a item DB (for item discription, amount in stock,prices etc).

So it looks like this

|Items| ---> |listitems| --P-- |Invoice|

I want to be able to subtracht the quantity from the invoice from the item database. Right now i have it loop thought the portal with go to row ( first) etc. and with every item it runs a script in the itemlist DB to take the quantity off in the items DB. The problem i found is that when i run a script it resets the go to row and it takes all the quantitys off the first item.

I just tried doing a manual count with a global and it still does that same. Any suggestions?

Do all of the printing and stuff in the related database where the items are records. This gets rid of the portal which is the cause of a lot of problems. It's also a lot easier when you get the hang of it.

Even FMI acknowledges that portals are not a great solution for printing. see TechInfo Article 103675.

  • Author

I'm not sure what you mean.

Do you mean make the the lineitems DB have the invoice?

Yes. Because when you think about it, the guts of the invoice *is* the line items. Bring the customer info in through a relationship back to the master database.

  • Author

I've have given it some thought, i could call a script from the invoice in the lineitems to go through and take off the quantity. but there is no easy way to find which lineitems to take off because it won't be able to tell with invoice is complete; unless i do a find or loop through each item. Which would be slow since the lineitems will have 300,000 + records.

hmmm or could i have a flag in each lineitem so thee script won't take off twice.....

Can't you use a calculation field to calculate the stock?

  • Author

thanks, Might be able to.

but in the mean time i figured something else out.

In my loop I wasn't calling Go to Related Row, which i though would be implicit after Go to Portal Row.

It all work ok now.... well.. pretty much. The loop does that last item twice for some reason.

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.