The underneath example works with \def\myHeader{\iftuut chapter\else high\fi}
 
How do you make it work with\def\myHeader{\doifmodelse{a}{chapter}{high}} ?
( without resorting to \doifmodeelse{a}{\tuuttrue}{\tuutfalse} )
 
\showframe
 
\newif\iftuut
%\tuuttrue
\tuutfalse
 
\setuppagenumbering[location=footer]
 
\setupheadertexts[\doifoddpageelse{right page}{left page}]
 
\definetext[chapter][header][chapter page]
 
\def\myHeader{\doifmodelse{a}{chapter}{high}}
%\def\myHeader{\iftuut chapter\else high\fi}
 
\setuphead
 [chapter]
% [header=chapter]
% [header=high]
 [header=\myHeader]
 
\starttext
\dorecurse{2}{\chapter{Chapter #1}\dorecurse{20}{\input knuth\par}}
\stoptext
 
---
 
 ! Undefined control sequence.
\myHeader ->\doifmodelse
                         {a}{chapter}{high}
\doifvaluesomething ...inga {\csname #1\endcsname
                                                  }\ifx \!!stringa \empty \e...
<argument> ...ething {\??ko \v!chapter \c!header }
                                                   {\setuplayouttext [\v!hea...
\firstoftwoarguments #1#2->#1
                            
<argument> ...BB {\v!chapter }\v!header \c!header
                                                  \dohandlepagebreakBB {\v!c...
\firstofoneargument #1->#1
                         
...
l.23 ...apter #1}\dorecurse{20}{\input knuth\par}}
 
---
 
Alan