I am trying to add a field to biblatex entries in the `tex`file. I am currently not able to apply a rule to one entry then apply it other rules to other entries.

I defined a command to add a field. Something is wrong with it but I don't know what it is:

```
\newcommand{\addnotetoentry}[2]{%
  \DeclareSourcemap{%
  \maps[datatype=bibtex]{%
    \map[overwrite]{%
      \step[fieldsource=entrykey,match=\regexp{^#1$},final]%
      \step[fieldset=note,fieldvalue={#2}]%
    }%
  }%
}%
}

```

Which is used like this:

```
\addnotetoentry{a}{one note --- hello my friend}
\addnotetoentry{b}{another note}

```

MWE:

```
\documentclass[12pt,letterpaper]{article}
\usepackage[backend=biber,style=alphabetic-verb,doi=false,eprint=false]{biblatex}
\usepackage{filecontents}

\begin{filecontents}{jobname.bib}
@ARTICLE{a,
   author = {Doe, J.},
   title = {The Title},
   journal = {The Journal},
}
@ARTICLE{b,
   author = {Smith, J.},
   title = {The New Title},
   journal = {The Same Journal},
}
\end{filecontents}
\addbibresource{jobname.bib}

\newcommand{\addnotetoentry}[2]{%
  \DeclareSourcemap{%
  \maps[datatype=bibtex]{%
    \map[overwrite]{%
      \step[fieldsource=entrykey,match=\regexp{^#1$},final]%
      \step[fieldset=note,fieldvalue={#2}]%
    }%
  }%
}%
}
\addnotetoentry{a}{one note}
\addnotetoentry{b}{another note}
\AtEveryBibitem{\printfield{note}\clearfield{note}\item}

\begin{document}

\nocite{*}
\printbibliography
\end{document}

```

I get in the ouput's references only one note (the last one that I defined):

![buggy output](https://i.stack.imgur.com/KtbGT.jpg)