Hi @v-yuxima-msft,
The basic situation is that I have a gallery that I'm trying to populate with items. I need those items to be received Text Messages for Contacts owned by the current user of the app (User()). The datasource is Dynamics 365, right now I have both the 'Text Messages' table and the Contacts table being used for this app. I put an example of one of the formulas that I've tried below, I know it's incomplete but it's part of the one I'm trying to into solving this problem. This is just a browse gallery I also have hooked to a searchbox and that search is by phone sender's phone number. I hope that helps and let me know if I can provide more information, I appreciate you looking into this for me.
SortByColumns(Search(AddColumns('Text Messages', "Contacts", LookUp(Contacts, 'Contact Owner Name' = User().FullName)), TextSearchBox1.Text, "cdi_senderphonenumber"), If(SortDescending1, Descending, Ascending))