Hi,
I have following code:
01.
var
arrlistNamaKaryawan;
02.
03.
google.script.run.withSuccessHandler(populateNamaKaryawan).getNamaKaryawanReceived();
04.
05.
var
dataSource =
new
kendo.data.DataSource({data : arrlistNamaKaryawan});
06.
07.
// create a new widget instance
08.
$(
"#employee"
).kendoAutoComplete({ dataSource: dataSource });
09.
10.
// retrieve the widget instance
11.
var
empAutoComplete = $(
"#employee"
).getKendoAutoComplete();
12.
13.
function
populateNamaKaryawan(listNamaKaryawan){
14.
console.log(listNamaKaryawan);
15.
console.log(Object.keys(listNamaKaryawan));
16.
console.log(Object.values(listNamaKaryawan));
17.
console.log(Object.entries(listNamaKaryawan));
18.
console.log(arrAnimal);
19.
arrlistNamaKaryawan = Object.keys(listNamaKaryawan);
20.
//arrlistNamaKaryawan = listNamaKaryawan;
21.
}
22.
23.
function
getNamaKaryawanReceived(){
24.
var
ss = SpreadsheetApp.openByUrl(urlStockBarangIT);
25.
var
ws = ss.getSheetByName(
"Master Karyawan"
);
26.
var
data = ws.getRange(2, 2, 3, 1).getValues();
27.
28.
var
options = {};
29.
data.forEach(
function
(v){
30.
options[v[0]] =
null
;
//convert to object
31.
});
32.
33.
console.log(options);
34.
return
options;
35.
36.
//console.log(data);
37.
//return data;
38.
}
But my #employee AutoComplete still no data
Thank you