*編集しました。私は以下のスクリプトを編集するのに助けが必要です。このスクリプトは、索引ビュー・ページの表の要素フィールドの色を指定するために使用されます。私は他のフィールドが "出席"の値を持っているように、 "Schstatus"のフィールド値を持つ別の要素フィールドを色付けする必要があります。 "Schstatus"フィールドの書式を定義するために追加する必要があるのは何ですか?2つのJavascriptをまとめて組み合わせる
{(function() {
"use strict";
// Run an event when the record list page is displayed
kintone.events.on('app.record.index.show', function(event) {
//Retrieve an array of field elements of the fields with field code of "Attendance"
var elStatus = kintone.app.getFieldElements('Attendance');
//Change the properties of the retrieved field elements for each record
for (var i = 0; i < elStatus.length; i++)
{
var record = event.records[i];
if (record['Attendance']['value'] === "Call Out")
{
elStatus[i].style.color = 'white';
elStatus[i].style.backgroundColor = "#e74c3c";
}
else if (record['Attendance']['value'] === "Pending")
{
elStatus[i].style.color = 'black';
elStatus[i].style.backgroundColor = "#ffcc00";
}
else if (record['Attendance']['value'] === "Confirmed")
{
elStatus[i].style.color = 'white';
elStatus[i].style.backgroundColor = "#a3b815";
}
}
});
})();
}
your_function_name('Schstatus');
を使用しています。 com/watch?v = fju9ii8YsGs)ビデオ。あなたが他のプログラミング言語に精通しているなら、それはあなたにJSの大きなブーストを与えるはずです –