2020-06-30

[AgentFlow]母子表單傳值無動作

 var parentForm = Form.getParentForm(); //抓取母表單物件

if(parentForm != null){
var sSerialNo = parentForm.getValue("txtSerialNo");
var t1 = parentForm.getComponent("Table1");  
t1.clear();
var subFormID = "ART00281300671728569";    
var sqlLoad = Client.SQLloadValue("SELECT * FROM " + subFormID + "_INS WHERE ITEM14 = '" +sSerialNo+"' ORDER BY ITEM26" );
for (var j=0; jvar dataList = sqlLoad.get(j);
t1.setValueAt(dataList.get("ITEM14"), j, 0);   
t1.setValueAt(dataList.get("ITEM9"), j, 1);
t1.setValueAt(dataList.get("ITEM26"), j, 2);   
t1.setValueAt(dataList.get("ITEM5"), j, 3);   
t1.setValueAt(dataList.get("ITEM8"), j, 4);
}
t1.setModifyingRowIndex(-1);  
Client.addExeLog("Refresh parentForm ..........>>>" );  
}else{
Client.addExeLog("單號:" + txtSerialNo +"------->NoDataFound!!");      
};

 

 

 

重點要加上  Form.setRefreshParentForm(true); 

母表單才會有動作

沒有留言:

張貼留言