This is likely a CRAZY question, but in the interest of time and having looked at lots of other approaches, here is my question.
I have a gallery based from a list called Teams. The gallery works, as far as functionality, beautifully using this formula in which we are totaling some points earned and then ranking the gallery in descending order by rank.
With(
{
records: //used to allow for team ranking
SortByColumns(
Search(
Filter(
Teams,
Gallery3_1.Selected.Category = "All" || Category = Gallery3_1.Selected.Category
),
txtSearch.Text,
"Title",
"Description"
),
"Total_x0020_Points_x0020_Earned",
Descending,
"Title",
Ascending
)
},//filter by topic and keyword text search
ForAll(
Sequence(CountRows(records)),
Patch(
Last(
FirstN(
records,
Value
)
),
{rowNumber: Value}
)
)
)//
However, I'd like to know if the following can be done. Add a label in the same gallery with this formula, which is, of course, from a different list and then sort the gallery by the result of this label calculation. I did try to replace the "Total_x0020_Points_x0020_Earned" in the first formula with the following formula without success -- but I did not spend a lot of time trying to resolve it.
Round(
Sum(
Filter(
'Activity Record',
TeamID = Text(ThisItem.ID)
),
Value(StarsEarned)
),
1
)
I'm concerned about the message I'm getting saying Sum is not supported but everything looks right.
I know this would not be the best approach were this project long term, but it is about to wrap up and we just want to get this ranked correctly using the right number, which is not happening using a workflow and the first formula.
Thanks for your thoughts on this...and I really hated to ask knowing this would be a band aid and hardly proper protocol for building an app.