# \[F\] Comment Sorting

**URL:** https://community.mp3tag.de/t/f-comment-sorting/2984
**Category:** Fixed Bugs
**Tags:** bug-fixed
**Created:** [March 1, 2006, 6:09pm UTC](https://community.mp3tag.de/t/f-comment-sorting/2984 "2006-03-01T18:09:59Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Ian](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/bb73d2/32.png) [@Ian](https://community.mp3tag.de/u/Ian)
#### Post date: [March 1, 2006, 6:09pm UTC](https://community.mp3tag.de/t/f-comment-sorting/2984/1 "2006-03-01T18:09:59Z")

</div>

I have been entering Billboard info into the comment tag of a library of Top 100 songs from 1955 to date. I have a seperate directory for each year.

I prepare the directory by selecting all and \< blank \> the comments.

I then enter info in the format xx-yy-zz where xx is peak position, yy is peak weeks, and zz is Top 40 ranking for the year. There are usually many more files in a directory than the top 40. Those other comments are left blank.

I have added a "$right(%comment%,2)" sort function to the comment column.

Sort results are almost correct but some items are out of sequence. I see blank comment items merged into the commented list and sometimes I see commented items mixed in with blank items.

View refresh, plus column resort down and up will eventually (normally) fix the order.

Not a huge problem for me as I eventually transfer the ranking info over to Track which does sort properly.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [March 1, 2006, 6:28pm UTC](https://community.mp3tag.de/t/f-comment-sorting/2984/2 "2006-03-01T18:28:16Z")

</div>

> [@](#):
>
> I have added a "$right(%comment%,2)" sort function to the comment column.  
> [..]  
> View refresh, plus column resort down and up will eventually (normally) fix the order.

I'm not sure if I understand you, but did you expect that the list is instantly sorted after you've added the sort option to the comment field?

I don't see the bug here.

---

<div class="post-metadata">

### Author: ![Ian](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/bb73d2/32.png) [@Ian](https://community.mp3tag.de/u/Ian)
#### Post date: [March 1, 2006, 6:58pm UTC](https://community.mp3tag.de/t/f-comment-sorting/2984/3 "2006-03-01T18:58:24Z")

</div>

I usually have order set to Title ascending while I am editing data and then switch to Comment ascending to check the data.

The problem shows up when I check to sorted (by function) data. As I said, it is almost correct. Just some (arbritary) items are out of order.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [March 1, 2006, 7:28pm UTC](https://community.mp3tag.de/t/f-comment-sorting/2984/4 "2006-03-01T19:28:29Z")

</div>

Sorry, but I can't see any problem here. Maybe you can give me a concrete example which I can try to reproduce (including data)?

---

<div class="post-metadata">

### Author: ![Ian](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/bb73d2/32.png) [@Ian](https://community.mp3tag.de/u/Ian)
#### Post date: [March 2, 2006, 2:22pm UTC](https://community.mp3tag.de/t/f-comment-sorting/2984/5 "2006-03-02T14:22:24Z")

</div>

Here is better sample data.

bytrack.csv shows the comment data, ordered by track. Produced by file -\> export.

bycomment.m3u shows a typical result of sorting column by title and then by comment. Produced by file -\> playlist.

The result is only typical because resorting produces a different order.

Moderation: attachments removed

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [March 2, 2006, 2:48pm UTC](https://community.mp3tag.de/t/f-comment-sorting/2984/6 "2006-03-02T14:48:12Z")

</div>

Thanks for pointing. I'll fix that to the next release!

```
$if(%comment%,$right(%comment%,2),) should work for now.

```

Best regards,  
~ Florian

---

<div class="post-metadata">

### Author: ![Ian](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/bb73d2/32.png) [@Ian](https://community.mp3tag.de/u/Ian)
#### Post date: [March 2, 2006, 4:28pm UTC](https://community.mp3tag.de/t/f-comment-sorting/2984/7 "2006-03-02T16:28:32Z")

</div>

😃  
That fixed the symptom. Thanks.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [March 7, 2006, 10:27am UTC](https://community.mp3tag.de/t/f-comment-sorting/2984/8 "2006-03-07T10:27:15Z")

</div>

The bug is [fixed](http://developer.mp3tag.de) too now 🙂

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [December 28, 2018, 1:40pm UTC](https://community.mp3tag.de/t/f-comment-sorting/2984/9 "2018-12-28T13:40:42Z")

</div>

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