# Inaccurate returns by $meta(x,0) in a special case

**URL:** https://community.mp3tag.de/t/inaccurate-returns-by-meta-x-0-in-a-special-case/44428
**Category:** Fixed Bugs
**Tags:** bug-fixed
**Created:** [February 5, 2019, 1:39am UTC](https://community.mp3tag.de/t/inaccurate-returns-by-meta-x-0-in-a-special-case/44428 "2019-02-05T01:39:41Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![vilsen](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/e95f7d/32.png) [@vilsen](https://community.mp3tag.de/u/vilsen)
#### Post date: [February 5, 2019, 1:39am UTC](https://community.mp3tag.de/t/inaccurate-returns-by-meta-x-0-in-a-special-case/44428/1 "2019-02-05T01:39:41Z")

</div>

Inaccurate returns are given by meta placeholders for value 0 if they refer to their own field.

I've made some tests with Format value, based on this multivalue field: TESTING=Arnold\Bruce\Cedric

Tested in v2.93

Note: The forum replaces double back slashes with single so Arnold\Bruce\Cedric means triple values

===== Issue 1 =====

Field : TESTING  
Format string : $meta(testing,0)

the return is the multivalue Arnold\Bruce\Cedric

However, with

Field : TESTING  
Format string : $meta(testing,1)

the return is Bruce

and with

Field : TESTING  
Format string : $meta(testing,2)

the return is Cedric

So it seems that the format string in the first example (value 0) incorrectly returns the full multivalue. But if you use it for a different field:

Field : CHECKING  
Format string : $meta(testing,0)

then the return is Arnold

So the issue only occurs when the format string refers to value 0 **and** to its own field

===== Issue 2 =====

A similar issue but for %fieldname%

Field : TESTING  
Format string : %testing%

returns Arnold\Bruce\Cedric

but

Field : CHECKING  
Format string : %testing%

returns Arnold

---

<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: [February 5, 2019, 10:09am UTC](https://community.mp3tag.de/t/inaccurate-returns-by-meta-x-0-in-a-special-case/44428/2 "2019-02-05T10:09:44Z")

</div>

Thanks for reporting!

I can reproduce and confirm Issue 1, which is based on a (wrongly performed) optimization in the Format value action. I'll fix that to the next release.

If you're interested in the details: I'm comparing the existing and new values and don't change anything, if they're identical. However, I was only comparing the first value, which leaves the complete field untouched in case of `$meta(field,0)`.

Issue 2 is a little bit different: it _currently_ leaves the field untouched if you're using `%field%` as format string. This is only due to the erroneous check described above. Why? Because `%field%` always returns the first value of field. So after Issue 1 is fixed, both cases from your example in Issue 2 should return `Arnold`.

> _A meta comment: you can wrap strings containing backslashes in backticks ` so that they're formatted as preformatted text, e.g., `Arnold\\Bruce\\Cedric`._

---

<div class="post-metadata">

### Author: ![vilsen](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/e95f7d/32.png) [@vilsen](https://community.mp3tag.de/u/vilsen)
#### Post date: [February 5, 2019, 3:51pm UTC](https://community.mp3tag.de/t/inaccurate-returns-by-meta-x-0-in-a-special-case/44428/3 "2019-02-05T15:51:59Z")

</div>

Thanks for the details, they made me realize that if the receiving field is a multivalue field too, and value 0 is identical in both fields, then this bug will occur regardless. So the format string doesn't need to refer to its own field as I concluded.

Great that you can fix it soon!

---

<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: [February 8, 2019, 9:32am UTC](https://community.mp3tag.de/t/inaccurate-returns-by-meta-x-0-in-a-special-case/44428/4 "2019-02-08T09:32:00Z")

</div>

I've fixed this with [Mp3tag v2.93a](https://community.mp3tag.de/t/455). Thanks again for reporting!

---

<div class="post-metadata">

### Author: ![vilsen](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/e95f7d/32.png) [@vilsen](https://community.mp3tag.de/u/vilsen)
#### Post date: [February 10, 2019, 10:38am UTC](https://community.mp3tag.de/t/inaccurate-returns-by-meta-x-0-in-a-special-case/44428/5 "2019-02-10T10:38:19Z")

</div>

Thanks for the fix! I've tested and it's working properly 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: [February 10, 2019, 10:44am UTC](https://community.mp3tag.de/t/inaccurate-returns-by-meta-x-0-in-a-special-case/44428/6 "2019-02-10T10:44:19Z")

</div>

Excellent! Thanks for confirming the fix.

---

<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: [March 12, 2019, 10:46am UTC](https://community.mp3tag.de/t/inaccurate-returns-by-meta-x-0-in-a-special-case/44428/7 "2019-03-12T10:46:22Z")

</div>

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