% arara: pdflatex
% arara: bib2gls
% arara: pdflatex
\documentclass[12pt,a4paper]{article}

\usepackage{glossaries-extra}

\newglossaryentry{sample}{name={sample},description={an example}}
\GlsXtrSetField{sample}{testnum}{1}

\begin{document}
Non-starred: \GlsXtrIfFieldNonZero{testnum}{sample}{TRUE}{FALSE}.

Starred: \GlsXtrIfFieldNonZero*{testnum}{sample}{TRUE}{FALSE}.
\end{document}
