* 내 게시물을 편집했습니다. 아래 스크립트를 편집하는 데 도움이 필요합니다. 이 스크립트는 인덱스보기 페이지에서 테이블의 요소 필드의 색을 지정하는 데 사용됩니다. 다른 필드의 값이 "출석"인 것처럼 필드 값이 "Schstatus"인 다른 요소 필드의 색을 지정할 수 있어야합니다. "Schstatus"필드의 형식을 정의하려면 무엇을 추가해야합니까?두 개의 자바 스크립트를 함께 사용하십시오.
{(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');
를 사용한다. co.kr/watch? v = fju9ii8YsGs) 비디오. 다른 프로그래밍 언어에 익숙하다면 JS에 큰 도움이 될 것입니다. –