I am designing an address book using the CSV parser in How to create form letters from spreadsheet data in ConTeXt?. Some persons have an academic title, while others not. Some also have a job address, others not. My layout depends on whether these data fields contain information or not. I can't figure out how to test, if a CSV field is empty or not. My first idea was to use something like \doifnotempty{\expanded{\insert[acadtitle]}{(\insert[acadtitle])}
, but that always executes the command regardless whether the field is empty or not. Any hints? Thanks.
\doif
commands?\insert
is an expandable command then\doifnotempty{\insert[acadtitle]}
should work (no need to\expand
). If it is unexpandable, then you can try\doiftextelse{\insert[acadtitle]}{true}{false}
. If these don't work, then please post a minimal working example.