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.

Selecting rows from a portal ???

Featured Replies

I have three tables, purchase_orders.fp5, po_lines.fp5 and inventory.fp5

The purchase_orders table has a portal of po_lines set by a relationship on the field po_id.

I have written a script so when the items ordered from the purchase order are received, the user can hit a checkbox and activate a script within the portal row that should add that item into the inventory database.

Everything works perfectly except that no matter which row is selected the first portal row is the one referenced (set field 'temp' by po_line by po_id:product_id). I assume this has something to do with the way I have my relationships setup. Ideas?

The way to go is to use a global field in the related file.

Are you creating a record in Inventory ?!!

The script in portal row could

GotoRelated record (OrderToPoLines - show only)

PerformExternal script (OrderToPoLines-(SetField, Global, Product_ID))

PerformExternal script (Inventory-Add Product)

Refresh

Script in Inventory "AddProduct Script"

Create New Record

Set Field (Product_ID, ::InventoryToPoLine:global)

Now, if you're adding the quantity ordered in the Inventory "quantityOnHold", you could do it that way :

GotoRelated record (POLines - show only)

PerformExternal script (PoLines-(SetQuantities in inventory))

Refresh

Script in POLines "SetQuantities in inventory"

SetField, Global, Product_ID

SetField, GlobalQuantity, Quantity Ordered

GoToRelatedRecord (POLines:global::Inventory:Product_ID - show only)

Perform External Script (Inventory-(Set Field(QuantityOnHold, QuantityOnHold+InventoryToPoLines::GlobalQuantity)

Hope there isn't any error in this script...

  • Author

Thank you for the information but it didn't work. The reason is because my GotoRelated record is based on my relationship of po_id between purchase_orders.fp5 and po_lines.fp5. po_lines.fp5 has four records with the same po_id, so all four are returned and the values from the first record in the found set is used instead of the record selected in the portal.

Nope !

check back your GTRR script step. Show only must be checked

  • Author

Post deleted by reflous

  • Author

Nevermind, I thought it worked, it still doesn't. Show only was already selected. It is strange, even though show only is selected, when I go to po_lines there are still 4 records found, but the record I care about is the one selected.

Post your script.... mad.gif

Must be some kind of obvious thing though.

Make a test first.

Add a small button.

Attach this script :

Go to related record (Your relationship to Po - Show Only)

Click in any row and see where you are...

BTW, sorry if it sounds....

Your button must be in the Portal, not outside...

Hmm.. Sorry for that one!

See attached a very simple demo of how you can update the inventory from a button in the portal.

Well, the script isn't triggered when the update already happened. This could be changed though if you wanted to edit the quantity ordered afterwards.

Open the PO file and click update in last portal row. Then create other orders or process other entries in the portal.

iNVENTORY.zip

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.