Foreign key relationship - how to lookup records based on foreign key (parent key)?

Foreign key relationship - how to lookup records based on foreign key (parent key)?

Hi all,

I'm modifying the Order Management application that comes with Zoho Creator.

In the New Product form, I added an Add Items subform that captures individual serial #s along with a status field that captures the location of the the item. 

That all works well.  Each time I go in to view or edit the product, it lists the associated items in the subform.

Next, I modified the Product Subform that's included as part of the New Order form because I want it to pull all the related Items records for a given Product when I select that Product, then bind those Items records to a Multi-Select field.  In our use case, we need to know exactly which serial #s are sent (healthcare) for tracking purposes.

OnUserInput, I see that I can get the ID field for the Product, but how do I use this to look-up the Items records that are associated with this Product?

itemList = Items_Product_Subform[??? == row.Product_ID]; //what field in the Items_Product_Subform do I compare to?
row.Add_Items_CBox_List:ui.append(itemList.Item_ID_UPC_Barcode.getall());

I tried adding a Lookup in the Add Items subform, used "Existing Relationship" > "New Product > Add Items - ID" expecting that to work based on what I read here ( https://www.zoho.com/creator/help/forms/creating-subforms.html), but no luck yet.

Any pointers from Herb or others?  This seems like it should be pretty straightforward.

Thanks!