Author Topic: Custom tag not working in fields and sorting.  (Read 3177 times)

stardot

  • Jr. Member
  • **
  • Posts: 32
Hi,

I've made a tag to use it in sorting and might use it to display in fields. It shows me that it is OK in preview, but when I want to use it doesn't work.



https://imgur.com/Ww8GKYX this is a link to the image since it is not showing here.

What is the problem, and how can I fix it?

Thanks

The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1267
Hi,

I've made a tag to use it in sorting and might use it to display in fields. It shows me that it is OK in preview, but when I want to use it doesn't work.



https://imgur.com/Ww8GKYX this is a link to the image since it is not showing here.

What is the problem, and how can I fix it?

<Original Date> is not a valid tag, so that's probably why.

stardot

  • Jr. Member
  • **
  • Posts: 32
It is a custom tag. And it is shown working in the preview. If it isn't valid then it wouldn't work in the preview.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34264
By default any virtual tag will sort as a string. Try setting the field type in Preferences/Tags(2)/Configure Fields

edit:
i see you are formatting the date so it should not matter, so i dont know why it would not sort correctly. Trying myself the sorting is working fine
Last Edit: July 04, 2021, 01:14:47 PM by Steven


The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1267
It is a custom tag. And it is shown working in the preview. If it isn't valid then it wouldn't work in the preview.

"Original Date" isn't labeled in the "identifier" field as a custom definition, so are you saving it "to music file as tag" from the previous settings screen?

hiccup

  • Sr. Member
  • ****
  • Posts: 7710
It is a custom tag. And it is shown working in the preview. If it isn't valid then it wouldn't work in the preview.
Maybe your custom tag 'Date' is conflicting with MB's internal Date function?
What happens if you name that custom tag Date2. (or anything else)



stardot

  • Jr. Member
  • **
  • Posts: 32
It is a custom tag. And it is shown working in the preview. If it isn't valid then it wouldn't work in the preview.

"Original Date" isn't labeled in the "identifier" field as a custom definition, so are you saving it "to music file as tag" from the previous settings screen?

I set it as one of the WWW tags.

stardot

  • Jr. Member
  • **
  • Posts: 32
It is a custom tag. And it is shown working in the preview. If it isn't valid then it wouldn't work in the preview.
Maybe your custom tag 'Date' is conflicting with MB's internal Date function?
What happens if you name that custom tag Date2. (or anything else)

There is not custom tag named "Date", I made one called "Original Date".
Last Edit: July 23, 2021, 10:31:45 PM by psychoadept

stardot

  • Jr. Member
  • **
  • Posts: 32
By default any virtual tag will sort as a string. Try setting the field type in Preferences/Tags(2)/Configure Fields

edit:
i see you are formatting the date so it should not matter, so i dont know why it would not sort correctly. Trying myself the sorting is working fine

I am sorting by "Album Artist/Sort Original Date" and tracks are not sorted properly according to the values I put in them.

Is it something wrong I am doing?

And how to display the date in the field?

Thanks

hiccup

  • Sr. Member
  • ****
  • Posts: 7710
There is not custom tag named "Date", I made one called "Original Date".
Ok, you created a virtual tag for it. Same difference…


stardot

  • Jr. Member
  • **
  • Posts: 32
There is not custom tag named "Date", I made one called "Original Date".
Ok, you created a virtual tag for it. Same difference…



Oh that, sorry. But the problem is not gone even after removing it.

hiccup

  • Sr. Member
  • ****
  • Posts: 7710
Oh that, sorry. But the problem is not gone even after removing it.
Ok, back to the drawing board then.
In your OP you stated 'it is not working'.
Could you specify what that means exactly?
And perhaps post your virtual formula and the custom tags it depends on?

stardot

  • Jr. Member
  • **
  • Posts: 32
Oh that, sorry. But the problem is not gone even after removing it.
Ok, back to the drawing board then.
In your OP you stated 'it is not working'.
Could you specify what that means exactly?
And perhaps post your virtual formula and the custom tags it depends on?

As you can see, in the image I posted, inside the Red marker, instead of displaying the output, the whole formula is displayed, wheres it is working in the preview (inside green marker).

This is the formula:
Code
$IsNull(<Original Date>,$Date(<Year>,yyyy-MM-dd),$Date(<Original Date>,yyyy-MM-dd))

And it depends on the custom tag Original Date which replaces the tag "WWW Publisher".

Not only that it doesn't display the correct output in the field, it also doesn't sort correctly when I use it for sorting. For example when I set the following sorting order: 1: Album Artist, 2: Sort Original Date (it is the same formula above), the result sorting very wrong to what it is supposed to be.
Last Edit: July 13, 2021, 07:34:46 PM by stardot

hiccup

  • Sr. Member
  • ****
  • Posts: 7710
And it depends on the custom tag Original Date which replaces the tag "WWW Publisher".
I'm not sure I understand this part.
Why "replacing WWW Publisher" instead of creating a proper and dedicated Original Date tag?

And, do you have that WWW Publisher tag formatted as 'date' type?
(tags (2) > configure fields)