0
Проблема с кодом JavaScript
Из чата сообщества
Содержание обработано автоматически и может отличаться от оригинала.
var pollz = tools.xquery('for $elem in polls where MatchSome( $elem/id, ( 7060000815124938640, 7060015777656679396, 7060017240343424379 ) ) return $elem');
var poll_resultz = tools.xquery('for $elem in poll_results where MatchSome( $elem/poll_id, ( 7060000815124938640, 7060015777656679396, 7060017240343424379 ) ) return $elem');
columns.Clear();
_cc = columns.AddChild();
_cc.column_title = 'ФИО';
_cc.flag_formula = true;
_cc.column_value = "ListElem.fullname";
_cc.datatype = "string";
_cc = columns.AddChild();
_cc.column_title = 'Должность';
_cc.flag_formula = true;
_cc.column_value = "ListElem.position";
_cc.datatype = "string";
for( poll in pollz ){
tePoll = tools.open_doc(poll.id).TopElem;
for(question in tePoll.questions){
_cc = columns.AddChild();
_cc.column_title = question.title;
_cc.flag_formula = true;
*cc.column_value = "ListElem.cl*" + question.id;
_cc.datatype = "string";
}
}
var resData = []
for(poll_res in poll_resultz){ rowData = {};
tePollRes = tools.open_doc(poll_res.id).TopElem;
rowData.SetProperty('PrimaryKey',poll_res.id);
rowData.SetProperty('Fullname',tePollRes.person_fullname);
rowData.SetProperty('Position',tePollRes.person_position_name);
for(question in tePollRes.questions){
rowData.SetProperty('cl_'+ question.id, question.value);
}
resData.push(resData);
}
return resData;
Всем привет, подскажите, в чем проблема
2 ответа
Чтобы ответить, необходимо войти в систему