TrapItem Num    | state      | port       | alert address
{%
    for i, item in ipairs(ResData) do
        local num = item.Id .. string.rep(' ', (16 - string.len(item.Id))) .. "|"

        local state = ""
        if item.Enabled == true then
            state = " enabled    |"
        else
            state = " disabled   |"
        end

        local port = " " .. item.Port .. string.rep(' ', (11 - string.len(item.Port .. ""))) .. "|"
        local address = " " .. item.Address

        if i == #ResData then
            echo(num .. state .. port .. address)
        else
            echo(num .. state .. port .. address, '\n')
        end
    end
%}