Skip to main content

Use if/else statements in DekiScript (SAP KC)


Evaluate a conditional expression, if the outcome of the expression is nil, false or 0, execute the block immediately following the if statement. Otherwise, execute the block following the optional else statement.

Different languages treat different values that aren't a true/false boolean differently. In DekiScript false as well as nil and zero are logically false, while True and everything else (other than nil, false or 0) are treated as logically true.



To conditionally include a template:

if(date.hours( >= 12) {
<p style="font-size: 12px;">OUTPUT INTENTIONALLY NOT RENDERED</p>


To conditionally emit one text or another:

if(user.anonymous) {
   "Welcome guest. Please register!"
} else {
   "Welcome back ".. .. "!"

Welcome guest. Please register!

  • Was this article helpful?