Hi,
It has been a minute since you posted this question, but I believe I understand your question. Are you using a modern table to populate a modern form, where the table acts kind of like a gallery?
If so, I encountered the same issue and found a quasi-work around. I'll share below, since I haven't seen anyone else post a solution other than modern controls are terrible, don't use them. 😅
This is my first post in this forum, so bear with me if I make any errors in formatting my response.
Solution:
If you have filters acting on your data source, this is the path that worked best for me:
On the OnVisible property for the screen, I added a variable for the table's data:
Set(varTable1, DataSource with filters);
Then you can use this for the Items property in your table and to create a second variable (which you may already be using) called CurrentItem.
In the OnVisble property for the screen, also add a context variable:
UpdateContext({CurrentItem: First(varTable1)})
and add this into the OnSelect for the Table:
UpdateContext({ CurrentItem:Table1.Selected })
and, finally, add this into the Item property for the Form:
If you don't have filters on your solution, then you can skip most of these steps and just set your Item property for your form to:
First( DataSource )
This doesn't auto-select the first record (like you can in a gallery), but it ensures that the first record is populated when the screen loads.
Quick Note: If the list is sorted, it won't update the order. So, there are drawbacks to this method. Otherwise, it's great to ensure the first record is visible when they view the page, especially given the limits with modern controls.