Hi @BLJohnson ,
Here’s how you can set up your item property for the form that is connected to the 'Detail List':
LookUp(DetailList, TCID = MainList_Gallery.Selected.TCID)
Or, if you expect multiple related items and want to edit them, you can set up your form to handle a collection or table. In this case, you would first collect the related items into a collection using the OnSelect property of the gallery or another event. For example:
// This would be in the OnSelect of the Gallery item or another event
ClearCollect(RelatedDetailItems, Filter(DetailList, TCID = MainList_Gallery.Selected.TCID))
Then, you would bind this collection to the form. If the form is expecting a single item, you would need to handle navigation through the collection items (for example, editing the first item, having next/previous buttons, etc.).
For the 'Item' property of the form that will be editing the 'Detail List' data:
// If you have a single form and want to edit the first related item
First(RelatedDetailItems)
Or, if you have multiple forms for multiple items:
// If you have multiple forms for multiple items
// and you set a variable CurrentItemIndex to navigate through them
RelatedDetailItems[CurrentItemIndex]
Make sure that after making changes in the form, you handle the save appropriately, updating the 'Detail List' with the changes made.
If the 'Detail List' can have multiple related records for a single 'Main' list item, and you want to edit them all, you would typically have a gallery to display these related records and then an edit form that would show the details of the selected record from this secondary gallery.
However, since you want to avoid an additional gallery for the secondary list, you would need to manage navigation through the related 'Detail List' items manually (as shown with the CurrentItemIndex example above), or only edit the first related item.
This will look up the tab in the collection where the TabId matches the CurrentTabId.
Kindly mark the solution as accepted if it resolves your issue.
Best Regards
Muhammad Mudassar Mazhar