# Custom "sort by" for a field column instead of alphanumeric sorting

**URL:** https://community.mp3tag.de/t/custom-sort-by-for-a-field-column-instead-of-alphanumeric-sorting/60948
**Category:** Support
**Created:** [May 12, 2023, 5:34pm UTC](https://community.mp3tag.de/t/custom-sort-by-for-a-field-column-instead-of-alphanumeric-sorting/60948 "2023-05-12T17:34:45Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![DJNeidermeyer](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/f08c70/32.png) [@DJNeidermeyer](https://community.mp3tag.de/u/DJNeidermeyer)
#### Post date: [May 12, 2023, 5:34pm UTC](https://community.mp3tag.de/t/custom-sort-by-for-a-field-column-instead-of-alphanumeric-sorting/60948/1 "2023-05-12T17:34:45Z")

</div>

Throwing myself to wolves here probably but I'm not experienced enough to do it myself, but I think it's pretty simple and analyzing your advice will help me figure out problems in the future.

I want to sort my CD ripper confidence field by whether the value contains "Secure: no", "Secure: yes", or contains neither. This is instead of sorting by the default alphanumeric characters at the beginning. I can visualize the process but don't know the syntax.

Thanks!

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [May 12, 2023, 6:13pm UTC](https://community.mp3tag.de/t/custom-sort-by-for-a-field-column-instead-of-alphanumeric-sorting/60948/2 "2023-05-12T18:13:07Z")

</div>

Please show us a [screenshot](https://community.mp3tag.de/t/hints-for-asking-support-requests/56190#use-screenshots-to-exemplify-the-issue-2) from Alt + T on one of your loaded tracks to see which "CD ripper confidence" tag you can [add to your columns](https://docs.mp3tag.de/customization/file-list/#adding-and-removing-columns) in the file list view.

---

<div class="post-metadata">

### Author: ![DJNeidermeyer](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/f08c70/32.png) [@DJNeidermeyer](https://community.mp3tag.de/u/DJNeidermeyer)
#### Post date: [May 12, 2023, 6:39pm UTC](https://community.mp3tag.de/t/custom-sort-by-for-a-field-column-instead-of-alphanumeric-sorting/60948/3 "2023-05-12T18:39:58Z")

</div>

The column is already added, the issue is sorting the values in the column by some text that is inside the values. I'll post a screenshot example when I get home from work.

---

<div class="post-metadata">

### Author: ![DJNeidermeyer](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/f08c70/32.png) [@DJNeidermeyer](https://community.mp3tag.de/u/DJNeidermeyer)
#### Post date: [May 12, 2023, 11:11pm UTC](https://community.mp3tag.de/t/custom-sort-by-for-a-field-column-instead-of-alphanumeric-sorting/60948/4 "2023-05-12T23:11:17Z")

</div>

![image](https://community.mp3tag.de/uploads/default/original/2X/6/6ca3f3379e20c3f6bb02b30fa42a38ba0d3dab00.png)

So the column is already added to extended tags, and the fields are as below

![image](https://community.mp3tag.de/uploads/default/original/2X/b/b8e43b9bbfa49ea1ee4388c3d7485be2b1439791.png)

I'm thinking there is some kind of syntax I can use where I put the question marks that will sort the entries by "Secure: No" , "Secure: Yes", and by not having either.

I want to put special characters in filenames of insecure CD rips.

(These are fields created by dbPoweramp, by the way).

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [May 13, 2023, 6:36am UTC](https://community.mp3tag.de/t/custom-sort-by-for-a-field-column-instead-of-alphanumeric-sorting/60948/5 "2023-05-13T06:36:55Z")

</div>

> [@DJNeidermeyer](#):
>
> I want to put special characters in filenames of insecure CD rips.

Wouldn't it then be much easier to filter for the files?

Anyway: you can use scripting functions for "sort by", e.g.  
`$regexp(%accurateripresult%,'.*Secure: (.*?)\s+.*',$1)`  
This expression should return Yes or No or the whole string and sort accordingly.  
Test the string first in Convert\>Tag-Tag

---

<div class="post-metadata">

### Author: ![DJNeidermeyer](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/f08c70/32.png) [@DJNeidermeyer](https://community.mp3tag.de/u/DJNeidermeyer)
#### Post date: [May 16, 2023, 9:36pm UTC](https://community.mp3tag.de/t/custom-sort-by-for-a-field-column-instead-of-alphanumeric-sorting/60948/6 "2023-05-16T21:36:24Z")

</div>

To be honest, I had forgotten the Filter option, and using quotes it got me all my Secure: No grouped together so I could run my Action.

But thanks for the reply as it does give me something from which to learn!

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [June 15, 2023, 9:37pm UTC](https://community.mp3tag.de/t/custom-sort-by-for-a-field-column-instead-of-alphanumeric-sorting/60948/7 "2023-06-15T21:37:20Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
