Hello, I am having an issue with the sortbycolumns function, specifically with a lookup type column. Odd thing is that I have another lookup type column called country in my formula and it is working just fine, but this one is not, I think it has something to do with the Value. Anyway, here is my code for the items property of the gallery:
SortByColumns(
AddColumns(
Filter(Transactions,
Search_Requests_2.Text in Title ||
Search_Requests_2.Text in 'Request ID' ||
Search_Requests_2.Text in 'External Person/Organization'.Value ||
Search_Requests_2.Text in Submitter.DisplayName
),
"Submitter Name", Submitter.DisplayName,
"EPO", 'External Person or Entity'.Title,
"Country Name", Country.Value,
"Department", 'Function/Department'.Value,
"Product_Line", 'Product Line'.Value,
"Submission Date",'Date of Submission'
),
varSort,
If(varOrder, Descending, Ascending)
)
The column in question that is not working is the column "EPO".
Here is the code for the onselect button of the header for this column.
If(varSort="EPO",UpdateContext({varSort:"EPO", varOrder:!varOrder}),UpdateContext({varSort:"EPO", varOrder:false}))
is it possible to do sort by this lookup column?
Also related to this, I have a separate list that displays answers to project questions and in this gallery, I am displaying general details of a project, which includes two of the answers in that separate list. Is it possible to sort on columns in this same gallery when one of the columns exists in another list? Or possibly sort on whats directly in the gallery maybe?