This is written with a few assumptions:
1. Product Code is stored in the Inventory ID Table
2. You only care about seeing the product ID in the portal. (This could be different but I think this gives you an idea of how it works)
Create a new Table Reference of your Inventory_ID table, name it something like Inventory_ID_Select, and add a new calculation field that is equal to the number 1 (I call mine z1). Add that same field (z1) to the order table that the layout your working on is based off of. Create a relationship between these two tables (Order table and Inventory_ID_Select) where z1 = z1. Base your portal off of the Inventory_ID_Select table and change your script/filtering to be based off that table. What this will allow is for you to have a portal that, with no filtering, shows all records (because 1=1) and you can then filter down/select as necessary.
You can also add a new TR of the Inventory_Line_Items to the Inventory_ID_Select if needed based off of the already established relationship between these tables.
I hope this is what you're looking for or gets your started in the right direction!
Thanks for the quick response I have a question before I start on this journey. You mentioned "2.You only care about seeing the product ID in the portal." Just to clarify this means I can't put a script trigger or highlight and copy the product code can only see it correct? of course I can manually enter the code into the order but wouldn't be the ideal scenario for speed. is there no way to have a field that could be clicked and copied?
Instead of Ye Olde 1=1 relationsship to match to all records, you can also use the X operator and any pair of fields you care to select from either table to get your "match all" relationship.
You might also be interested in the two portals in the bottom of this demo file. It was not created with FM GO in mind, but it should work in FM GO as far as I know. (Let me know if it doesn't please as I don't own an iOS device that I can test it on.)
No, I just meant that with what I gave you, the only thing you would see in the portal is the Product ID (Or any data that's in the Inventory_ID table) and not any related data, unless you added new table references to those related tables based off the Inventory_ID_Select table.
You'll still be able to have a script/button that adds that item to an order.
You'd have a button that takes up the whole portal row. When touched, it would run a script that would do something like the following.
Set Variable [$id ; Inventory_ID_Select::Product Key]
Go to Field [Order Line Items::Item] ##This would be a field in your portal of Order Line Items
Go Portal Row [Last]
Set Field [Order Line Items::Item ; $id]
Hope this helps!
Thank you for the solution it does works on FMGO very well although I have encountered one problem haven't been able to figure out. I believe I replicated your solution sucessfully however when I use the script to "Add selected Line Item" my code copies correctly to the first entry in the portal list but every additional goes into the same field and overwrites the original? Here is the script what am i overlooking? My Tables are OrderEntry, OrderEntryLineItems, Inventory, Inventory4select, Pricebook
Set Variable[$Code_Pb_pk;value: Inventory_Items_4select::Code_PB_pk]
Set Variable [$OE_ID;Value: Order_Entry::OE_ID]
Go to Layout["TEST_1(OrderEntry)]
go to layout[original]
go to object[Object Name:"Order_EntryLineItemPortal"]
go to portal row [last]
go to portal row [previous]
go to field[OrderEntry_LineItems::Quantity]
Since you are creating a new record each time, I don't see how this could "overwrite the original".
I apparently was creating a new order each time instead of a line item I fixed the problem. Thanks.
This works very well for me and I want to expand my information on the page but have come to a road block. Recently downloaded a template that uses tabswhich I like quite well. With the solution I am using my Table for the Tabs is "OrderEntry" and I am wanting to have a Tab with "Log and Log LineItems" how can I use a portal or a relationship to show this information? What i would like to achieve are 3 tabs across the top: 0rder Entry, Order Report, Log Updates
So far the only way I have been successful in seeing the information I want is to have the Table be "LOG" and then display the line items which of course defeats the beauty of seeing the tabs.
Thanks for advice.
I'm not clear on what you want to see in "Log and Log lineItems" and how this data relates to the rest of your system.
Sometimes, developers have had to create multiple layouts that look like one layout with one tab control, but clicking a "tab" actually clicks a button that changes layouts to create the illusion that the user has different data from different tables on each tab.
the log is my daily updates I import from my companies excel file Ideally I would like to have as one of the tabs in the layout.
So what your describing is to go to another layout with my log items and make the other tabs same names (Dummies only with Scripts) to go back to the Order Entry layouts?
I mentioned multiple layouts as a possible solution, but it may not be the best option for your system.
I can't really suggest anything as I don't know how your log items relate to your orders and other data. Do you want to pull up list of Orders on tab one or just the list of items for one order on tab 1? What link, if any is there between a specific order or specific item order and your "log" records?
I want Orders on one tab, On a second Tab I want Log items. The relationship is by Item Code. I would like to be able to see the full list of all 500 Log item codes and there descriptions in one Tab.
Use a portal to the Log Items table. Set up a relationship that uses the X operator instead of =. Then all log item records will be listed in the portal no matter what record you are on on your current layout.
I have been able to get the tabs working correctly but i have run into one problem that have not been able to solve. I am modifying one of Phil's scripts http://www.4shared.com/file/plr_jbkk/EnhancedValueSelection.html and for some reason have not been able to get the "set field" to work properly? I have used this script with the invoice and invoice line items succesfully and the only thing I see different is I am not using Record ID? doesn't seem necessary since the item code is the ID and there isnt an additional table involved. I'm sure this is something very obvious and I am just not seeing.
Thanks in advance.
Set Variable[$Inv_Code_pk: Value:Products4selection::ProdID
go to layout["Inventory"(Inventory)]
go to Layout[Original layout]
go to Object[ObjectName:"Inventory_Portal"]
Go to Portal Row[Select;last]
Go to Portal Row [Select;Previous]
Go to Field[Inventory::Inv_Cod_pk
Hmmm, In line 1, you set $Inv_Code_pk to the value of ProdID, but in line 5, you refer to a variable named $ProdID. How did the variable $ProdID get a value? Shouldn't this step refer to $Inv_Code_pk?