I would like to modify the glossaryentryfield so that it creates output depending on whether or not user1 (key provided by the package has been defined/set or not. I tried the following:
\renewcommand*{\glossaryentryfield}[5]{\bfseries{\glstarget{##1}{##2}} & ##3 \\
\ifempty{\glsentryuseri{##1}}
it & is very empty \\
\else
& \glsentryuseri{##1} \\%
\fi}
which however results in several errormessages like this:
! Undefined control sequence. \ifempty l.49 \setentrycounter{page}\glsnumberformat{a}}} % The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g.,
\hobx'), type
I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.
(One for every Glossary entry it seems) obviously followed by an unmatched \else and unmatched \fi
As far as i can see, i have to do something with the expansion order, however i am a complete novice to latex. I can not simply set all user1-keys, since i want to only display that extra row if user1 is defined, the other row is just for debugging purposes.
I also tried to add \expandafter directly before the \if ( \expandafter\ifempty{\glsentryuseri{##1}} ) (resulting in the following output:)
user1value it & is very empty \\ & user1value
since nobody could awnser this i crossposted it at the latex community and added a minimal example there. As soon as it gets awnsered on one site i will crosspost the solution