(function () {
    "use strict";

    var events = [
        "app.record.create.show",
        "app.record.edit.show",
        "app.record.create.change.担任",
        "app.record.edit.change.担任"
      ];

    kintone.events.on(events, function(event) {
      var record = event.record;
      record.担任_帳票用.value = record.担任.value.map(function(user) {return user.name}).join(",");
      return event;
    });

})();