Hi
I have a gallery in my powerapp I'd like to dynamically filter both the field to search and the value of that search based on context variables passed through from a button on another screen. The field that I want to filter by is, in this case, a linked column in my sharepoint list datasource.
the button code, which seems to work fine, is
Navigate(InteractionsBrowseScreen,ScreenTransition.None, {InteractionsFilterValue:DataCardValue17.Text, InteractionsFilterField:"Organisation.Value"})
The InteractionsFilterValue is the default value of the search textbox in the gallery (TextSearchBox1).
The data field of the gallery is
SortByColumns(Filter([@Test_Interactions], StartsWith(InteractionsFilterField, TextSearchBox1.Text)), "Created", If(SortDescending1, Descending, Ascending))
Which I think should work, but it returns no rows.
If I hard-set the filter field rather than using the variable, it works, although I do get a delegation warning
SortByColumns(Filter([@Test_Interactions], StartsWith(Organisation.Value, TextSearchBox1.Text)), "Created", If(SortDescending1, Descending, Ascending))
How can I do this without creating duplicate screens and galleries with different data fields?