This reference provides an overview of the available template functions and variables in i-doit. The examples can mainly be used in the flow for the "API call" and "Send email" actions.
{# Location information of the current object #}Object: {{object.C__CATG__GLOBAL.title}}{# The 'parent' value contains the ID of the parent location #}{%ifobject.C__CATG__LOCATION.parent|id%}{# With object(ID) we load the parent object #}{%setparent=object(object.C__CATG__LOCATION.parent|id)%}Parent Location: {{parent.C__CATG__GLOBAL.title}}{%else%}No parent location defined{%endif%}
{# Load a specific object #}{%setanderes_objekt=object(123)%}{{anderes_objekt.C__CATG__GLOBAL.title}}{# Load linked object from attribute #}{%ifentry.parent|id%}{%setparent=object(entry.parent|id)%}{{parent.C__CATG__GLOBAL.title}}{%endif%}
{# Check if category exists #}{%ifobject.C__CATG__IPisdefined%}{# Check if attribute exists #}{%forentryinobject.C__CATG__IP%}{%ifentry.primary_hostaddressisdefined%}{{entry.primary_hostaddress}}{%endif%}{%endfor%}{%endif%}{# Alternative with default filter #}{{object.C__CATG__CPU.title|default('No Title')}}
{# Only primary contacts #}{%forentryinobject.C__CATG__CONTACT%}{%ifentry.primary=='Yes'%}{{entry.role}} (Primary Contact){%endif%}{%endfor%}{# With default value if empty #}{{entry.description|default('No Description')}}
{# Multiple Conditions #}{%ifstatus=='active'and(type=='server'ortype=='client')%}{# ... #}{%endif%}{# Status Text Mapping #}{%setstatus=object.C__CATG__GLOBAL.status%}{%setstatusText={'2':'Normal','3':'Archived','4':'Deleted'}[status]|default('Unknown')%}{# Ternary Operator #}{{value?'Yes':'No'}}{{value?:'Default Value'}}{# Short form if value falsy #}