I followed this but found some important additional steps to make this work not mentioned here...
1 - I had to use the square brakets when setting up the Collection. If I only used curly braces then I got errors and it would not work
2 - I did not need an extra comma at the end of the collection definition. My collection definition in the OnVisible of he screen looked like this
ClearCollect(AccountDetailTabs,[{ID:"Tasks", DisplayName:"Tasks"}, {ID:"Notes", DisplayName:"Notes"}, {ID:"Docs", DisplayName:"Docs"},{ID:"AcctContacts", DisplayName:"Contacts", Detail_Account_Contact: false }, {ID:"Opps", DisplayName:"Opps"}])
3 - I used the Collection ( AccountDetailTAbs) for the items in the Gallery as Suggested - works great
4 - THIS IS THE KEY - You MUST Clear the Collection in the OnHidden of the screen. I then set up the collection again to right after I cleared it out so there was no delay on seeing the tabs the next time I open this screen. I add this to the OnHidden - First I cleared out the collection then I set it up again
ClearCollect(AccountDetailTabs,{});
ClearCollect(AccountDetailTabs,[{ID:"Tasks", DisplayName:"Tasks"}, {ID:"Notes", DisplayName:"Notes"}, {ID:"Docs", DisplayName:"Docs"},{ID:"AcctContacts", DisplayName:"Contacts", Detail_Account_Contact: false }, {ID:"Opps", DisplayName:"Opps"}]);
5. the Default in the Gallery DOES WORK after you clear the collection and then create it again.. so you can use First(), Last() or the First(Filter()) as suggested to set a default ... Default would not work for me until I cleared and reset the collection as shown in step 4... You could probably just clear the collection in the OnVisoible and then define your collection used for the tabs, but it would slow opening the screen.. better in my mind to do it in the OnHidden so the user does not notice..
Hope this helps someone else stuggling with setting a default for a Tab interface using a horizontal Gallery.. Now I am going to document this so I dont forget how I solved this 🙂