Skip 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.

Inventory Script

Featured Replies

I need to track the amount of wine stored in tanks at the winery I work at. I have three parent tables:

One called STORAGE with a portal that is used to enter data about the movement of wine, the date of the transaction and which tank it went into. The next table (called WINES) stores data about the wine (vintage, varietal, etc.) The third table (called TANKS) keeps track of which tanks have what wine and how much free space, if any, is left in them.

The three parent tables are related the a third child table called LINES. This table keeps track of the portal records in the STORAGE table.

I've created a button on the STORAGE_Form layout which runs the script "Tank Inventory". It's first supposed to check if the storage report has been processed by seeing if a field called date_create is empty. If not, it goes on through the portal records removing and putting in wine depending on a field which can have a value of either "ship" or "receive". If the value is ship, then the script subtracts the wine from the gallonage of the tank. If it is receive it's the oppostie. If, at any time, the script notices there is not enough or too much wine in a tank, it will show a custom dialog and halt the script. Each tank has its own capacity, and the script should check each one.

However, the script doesn't properly check for the amount of wine in the given tank. It shows my custom dialog box saying there isn't enough room in the tank. If you read over the script I'm sure it will make more sense. I've looked over it a bunch and can't figure out what's wrong. I've attached a screen shot of the script. Thanks for any help you can give.

inventory_script.gif

  • 3 weeks later...

If, at any time, the script notices there is not enough or too much wine in a tank

I have just seen this unattended post during a search, and at first glance does it look like the scripting can be simplified by using multicriteria relations utilizing the > or <

Next thing I need some answers to is why you in the transaction are writing real data, the ID's for linking is all it should be, since we're in a many2many or rather several.

--sd

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.