# Duplicate Fields With Values

**URL:** <https://forums.ankiweb.net/t/duplicate-fields-with-values/741>\
**Category:** Help\
**Created:** [July 4, 2020, 6:29pm UTC](https://forums.ankiweb.net/t/duplicate-fields-with-values/741 "2020-07-04T18:29:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarcanon](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@sarcanon](https://forums.ankiweb.net/u/sarcanon)\
**Post date:** [July 4, 2020, 6:29pm UTC](https://forums.ankiweb.net/t/duplicate-fields-with-values/741/1 "2020-07-04T18:29:26Z")

</div>

Here’s a question from left field.

I have a large deck of 1000+ that contains a particular field that contains many Unicode characters that doesn’t sort the way I want. E.g., Characters with certain diacritical marks like macrons (e.g., ā) all sort to the bottom, as though the sorting were being done on the Unicode codepoint value rather than a case-folded value of the letter.

So, to be specific, I want this sort order:  
`aec, āio, art, ātm, azz`  
NOT `aec, art, azz, āio, ātm`  
as is currently the case.

As I wouldn’t dare to suggest that Anki change something as fundamental as its sort ordering code on my account, I’m content to implement a workaround, which would be to add a duplicate of the existing field, along with the values from the original field, except for case-folding of the characters not in the Latin-1 character-set. I’m happy to do this case-folding by manual editing. I just don’t want to have to copy all the values from the original field to the duplicate field. But, unless I am overlooking something, I see no function in Anki desktop to accomplish this.

However, I do note that Anki uses SQLite3 database as its data engine. Since I’m _au fait_ with SQLite, I’m happy to tweak the collection.anki2 data file directly. But, this seems risky.  
So, my question is, if I manually edit the data file, will this break my deck or otherwise possibly put it in an inconsistent state that Anki will have trouble dealing with?

Many thanks in advance.

- Scott

---

<div class="post-metadata">

**Author:** ![sarcanon](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@sarcanon](https://forums.ankiweb.net/u/sarcanon)\
**Post date:** [July 4, 2020, 7:53pm UTC](https://forums.ankiweb.net/t/duplicate-fields-with-values/741/2 "2020-07-04T19:53:39Z")

</div>

As I peruse the database-related code on GitHub with an eye toward direct modification of the database, it’s starting to look like it’s going to be a lot more trouble than it’s worth. Maybe I just need to rebuild my deck from scratch by exporting, adding my sort field, and importing again. But presumably this means I will lose all my study/review data, which would be a real drag.

Any better ideas?

Thanks again.

---

<div class="post-metadata">

**Author:** ![guillempalausalva](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/guillempalausalva/32/34258_2.png) [@guillempalausalva](https://forums.ankiweb.net/u/guillempalausalva)\
**Post date:** [July 4, 2020, 8:34pm UTC](https://forums.ankiweb.net/t/duplicate-fields-with-values/741/3 "2020-07-04T20:34:36Z")

</div>

Are you creating cards from time to time or do you have them all already? If the latter you can create a new field and assign a number an sort by it. Alternatively copying the content and deleting the diacritical marks etc. I actually do this approach when generating cards for the same purpose as you. If your case is the former, I guess you could still sort it out via add-on.

---

<div class="post-metadata">

**Author:** ![sarcanon](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@sarcanon](https://forums.ankiweb.net/u/sarcanon)\
**Post date:** [July 5, 2020, 8:22pm UTC](https://forums.ankiweb.net/t/duplicate-fields-with-values/741/4 "2020-07-05T20:22:22Z")

</div>

Thanks for your reply.

Yes, my cards are already existing. And, yes, as you suggest, adding a new field and copying the values into that field would be feasible, but for the fact that I have almost 1,000 cards. I’m trying to find a more efficient solution than manual copying and pasting.

---

<div class="post-metadata">

**Author:** ![mmdj2](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/mmdj2/32/124_2.png) [@mmdj2](https://forums.ankiweb.net/u/mmdj2)\
**Post date:** [July 6, 2020, 3:07am UTC](https://forums.ankiweb.net/t/duplicate-fields-with-values/741/5 "2020-07-06T03:07:48Z")

</div>

you can use [Advanced Copy Fields](https://ankiweb.net/shared/info/1898445115) to copy content of a field to another field without having to do it manually

---

<div class="post-metadata">

**Author:** ![sarcanon](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@sarcanon](https://forums.ankiweb.net/u/sarcanon)\
**Post date:** [July 6, 2020, 11:24pm UTC](https://forums.ankiweb.net/t/duplicate-fields-with-values/741/6 "2020-07-06T23:24:13Z")

</div>

This is **exactly** what I was looking for. Thank you so very much.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [May 1, 2023, 5:41am UTC](https://forums.ankiweb.net/t/duplicate-fields-with-values/741/7 "2023-05-01T05:41:28Z")

</div>


