Forum Discussion
ConnieH_456
Jun 16, 2021Copper Contributor
Sorting on a metadata column
I need to be able to sort (date order) a managed metadata column in SharePoint online. Is this possible? I haven't been able to figure it out.
ConnieH_456
Jun 18, 2021Copper Contributor
Susan, thank you for your response! Here is an example of an entry in a metadata (multiple lines of text) field:
"2018-08-27 New Order – 105 kits will arrive tomorrow"
I need to be able to sort on the date; I'm not sure how the calculated column needs to be set up to do this. So, I guess basically what I want is for the new column to pull the date into another column that I can sort on. Does that make sense? I truly appreciate your help.
SusanHanley
Jun 18, 2021MVP
Looks like you can't create a calculated column from a multiple lines of text field. If this column needs to remain multiple lines of text, I would recommend that you add a new column to enter the date that you are currently embedding in the Multiple Lines of Text field. However, if you can switch the column to be a single line of text field, you can use the following formula in your new Calculated column. Create a new column called Update Date or something like that and for the formula, type =LEFT([Column Name],10). You can actually make this a Date column by selecting Date as the type of column to be returned. Then, you will be able to sort Newest to Oldest (or vice versa) on your new Update Date column. You can continue to use the same format for entering your text and the data will be extracted into the new column. This is not going to work if you need to retain more than 255 characters in that text column, however. If what you are trying to sort on is when the row got updated last, just sort on Modified Date. You may also be able to create a flow to extract the first 10 characters and add it to a new column as well and keep the column multiple lines of text. I'm trying to answer your specific question but honestly, there may be a totally different and more effective way to accomplish your outcome goal. You may want to consider a PowerApp.
- ConnieH_456Jun 18, 2021Copper ContributorThanks, Susan.