Sort one to many TextColumn based on formatted state?
Hey team, I am having another moment... is there a way to sort a one to many text column based on the concatenated string?
Column:
Throws this error, as one would expect if it was using the column raw data to sort.
Any advice is greatly appreciated.
Solution:Jump to solution
Can’t you add the virtual column to the table with the data and then use that column for sorting?
4 Replies
Someone may have a way to do this in filament but I would create a model scope that adds this field at the database level or create a virtual column on the database that does this.
ooooh that might work.
I havent used virtual columns before but I'll give it a crack and check back. Many thanks.
Bah, I cant seem to pull the relation data into a virtual column.
Solution
Can’t you add the virtual column to the table with the data and then use that column for sorting?
maybe that does the trick