I would like to display DOI with \DeclareCiteCommand. I'm using \documentclass{report}.
I tried this:
\documentclass{article}
\usepackage[backend=biber, sorting=none]{biblatex}
\addbibresource{references.bib}
\DeclareCiteCommand{\mycite}%
{
\usebibmacro{prenote}\addspace
}%
{%
\mkbibquote{\thefield{title}}%
\addcomma\addspace by \printnames[][-\value{listtotal}]{author}%
\addcomma\addspace \thefield{year}%
\addcomma\addspace \mkbibitalic{\thefield{journaltitle}}%
\addcomma\addspace \mkbibitalic{\thefield{volume}}%
\mkbibparens{\thefield{number}}%
\addcomma\addspace%
}
{}
{
\usebibmacro{postnote}%
\addspace%
\mkbibparens{\url{\thefield{doi}}}%
\adddot%
}
\begin{document}
\mycite{sampleentry}
\end{document}
In the bibliography, I put this entry found in "Publication Manual of the American Psychological Association, Seventh Edition (2020)":
@article{sampleentry,
author = {Wang, Xiaoye and Lind, Mats and Bingham, Geoffrey},
year = {2018},
month = {06},
pages = {1513},
title = {Large Continuous Perspective Change With Noncoplanar Points Enables Accurate Slant Perception},
volume = {44},
number = {10},
journal = {Journal of Experimental Psychology: Human Perception and Performance},
doi = {https://doi.org/10.1037/xhp0000553},
}
However, I only get \thefield{doi}. Is there another command to print the DOI?

\addcomma\addspacewithout a surrounding\setunitin bibmacros, drivers or citation definitions.\thefieldshould almost never be used for printing. If you want to print fields use\printfield. Formatting commands should not be added manually around\printfield(or\thefieldfor that matter), they should be added in field format definitions. – moewe May 21 '23 at 12:11\setunit/the punctuation buffer) is liable to produce clashing/double punctuation if fields are missing.biblatexhas some emergency measures to prevent this (which is why in your examples the issue will probably not arise). The punctuation buffer provides a predictable framework to deal with punctuation that does not require TeX magic to avoid punctuation clashes. ... – moewe May 22 '23 at 19:24\printunit(or even worse\thefield) will usually yield bad results for missing fields (try\mkbibparens{\thefield{number}}on something with a missingnumberfield). – moewe May 22 '23 at 19:24