/************************************** 넥사크로 라이브러리 함수 lookupExpr 설명
// Adding customized lookupExpr function will be added to Data.js
// This function will compare the first condition and find the row position with respect to first condition.
// With respect to the row, it will return the value of the col3 of dataset.
// Example it will find the row position of col1 = 'a' and col2 = 'b' which is 2, then find the value of "col3" column, which is "Resulted Column"
// Input parameter Parameter 1. expression condition,2. column, which value should be found matching with first column's condition.
************************************/
_pDataset.lookupExpr = function (expr, outcol)
{
var view = this._viewRecords;
var start = 0;
var end = view.length;
var row = this.findRowExpr(expr, start, end);
// calls the findRowExpr function of Data.js from inside.
return (row == -1) ? undefined : this.getColumn(row, outcol);
};
======================================================================
/*******************************************************************************
* Function Name: lookupExpr4
* Description : 테스트 색상
* Arguments : facCode, LineCode
* Return :
********************************************************************************/
_pDataset.lookupExpr4 = function (expr)
{
var view = this._viewRecords;
var start = 0;
var end = view.length;
var row = this.findRowExpr(expr, start, end);
// calls the findRowExpr function of Data.js from inside.
var col1 = (row == -1) ? undefined : this.getColumn(row, "INSP_1TH_LED");
var col2 = (row == -1) ? undefined : this.getColumn(row, "INSP_2ND_LED");
var col3 = (row == -1) ? undefined : this.getColumn(row, "INSP_3TH_LED");
var rstRtn = new Array(col1, col2, col3)
//var rstRtn = col1;
return rstRtn;
};
/*******************************************************************************
* Function Name: fn_progCr
* Description : 상태 배경색상
* Arguments : comp.parent.parent.fn_progCr("FAC_CD","LINE_CD")
* Return :
********************************************************************************/
this.fn_progCr = function(facTypeCode, lineCode)
{
var rstCr = this.ds_List.lookupExpr4("FAC_NM == '"+facTypeCode+"' && LINE_CD == '"+lineCode+"'");
var rtnCr;
if(rstCr[0] == "WHITE"){
rtnCr = "white";
}else if(rstCr[0] == "BLUE"){
rtnCr = "blue";
}else{
rtnCr = rstCr[0].toLowerCase();
}
return rtnCr;
}
'WEB > 넥사크로' 카테고리의 다른 글
넥스크로14 피벗 예제 - 동적 그리드 생성 (0) | 2019.01.25 |
---|---|
(넥사크로 14) 그리드 필수 값 체크 - 공통 함수 (0) | 2018.12.13 |
(넥사크로 14) 엑셀 복사하여 그리드에 붙여 넣기 (0) | 2018.12.13 |
(넥사크로 14)그리드 엑셀 출력 (0) | 2018.12.13 |
(넥사크로 14) 로우타입 변경 방법 (0) | 2018.12.13 |