{
  "info": "",
  "script_in_use": true,
  "field": {
    "new_record": [
      ["cope_company_id", "=", ["co_company_id"]]
    ],
    "cope_company_id": [],
    "cope_last_name": [
      ["cope_last_name", "=", ["_str_Format", ["cope_last_name"]]],
      ["cope_scKOKO_NIMI"]
    ],
    "cope_direct_telephone_number": [],
    "cope_title": [
      ["cope_title", "=", ["_str_Format", ["cope_title"]]]
    ],
    "cope_position": [
      ["cope_position", "=", ["_str_Format", ["cope_position"]]]
    ],
    "cope_info": [],
    "cope_first_name": [
      ["cope_scKOKO_NIMI"]
    ],
    "cope_mobile_phone": [],
    "cope_direct_fax_number": [],
    "cope_class": [],
    "cope_whole_name": [
      ["cope_whole_name", "=", ["_str_Format", ["cope_whole_name"]]]
    ],
    "cope_email": [],
    "cope_street_address": [
      ["cope_street_address", "=", ["_str_Format", ["cope_street_address"]]]
    ],
    "cope_post_code": [],
    "cope_post_office": [
      ["cope_post_office", "=", ["_str_Format", ["cope_post_office"]]]
    ],
    "cope_www": [],
    "cope_record_id": [],
    "cope_firm_id": [],
    "cope_transfer_id": [],
    "cope_customer_project": [],
    "cope_project_id": []
  },
  "function": {
    "cope_scKOKO_NIMI": [
      [
        "if", ["cope_first_name", "=", ""],
        [
          ["cope_whole_name", "=", ["cope_last_name"]]
        ],
        "else",
        [
          ["cope_whole_name", "=", ["concatWith", [[" ", "cope_first_name", "cope_last_name"]]]]
        ]
      ],
      ["_cope_tDomain", "=", ""],
      [
        "if", ["co_email", "<>", ""],
        [
          ["_cope_tDomain", "=", ["co_email"]],
          ["_cope_tDomain", "=", ["parse", ["_cope_tDomain", "@", "2"]]],
          [
            "if", ["_cope_tDomain", "=", ""],
            [
              ["_cope_tDomain", "=", ["co_www"]],
              ["_cope_tDomain", "=", ["parse", ["_cope_tDomain", "www.", "2"]]]
            ]
          ]
        ]
      ],
      [
        "if", ["_cope_tDomain", "<>", ""],
        [
          [
            "if", [["cope_email", "=", ""], "and", ["cope_first_name", "<>", ""], "and", ["cope_last_name", "<>", ""]],
            [
              ["cope_email", "=", ["concatWith", [["lowercase", ["cope_first_name"]], ".", ["_str__ToLower", ["cope_last_name"]], "@", "_cope_tDomain"]]],
              ["cope_email", "=", ["_str__ToMail", ["cope_email"]]]
            ],
            "elseif", ["cope_email", "=", ["concatWith", [["Old", ["cope_first_name"]], ".", ["Old", ["cope_last_name"]], "@", "_cope_tDomain"]]],
            [
              ["cope_email", "=", ["concatWith", [["lowercase", ["cope_first_name"]], ".", ["lowercase", ["cope_last_name"]], "@", "_cope_tDomain"]]],
              ["cope_email", "=", ["_str__ToMail", ["cope_email"]]]
            ],
            "else",
            [
              ["IDLE"]
            ]
          ]
        ]
      ]
    ],
    "cope_iBEFORE": [
      [
        "if", ["Before"],
        [
          ["cope_company_id", "=", ["co_company_id"]]
        ]
      ]
    ]
  }
}
