For the knowledge base, I'm answering to myself. Correct TS code is: submenu = HMENU submenu { entryLevel = 1 1 = TMENU 1.NO.allWrap = | stdWrap.if { value.data = register:count_menuItems isLessThan = 1 } }