0
Google AppScript 사용. 그룹에서 확인 된 RadioButton을 어떻게 찾을 수 있습니까? 핸들러가 필요하다면 서버 하나가 필요합니다.그룹의 어떤 RadioButton이 선택되어 있습니까 (Google AppScript)
많은 감사
Google AppScript 사용. 그룹에서 확인 된 RadioButton을 어떻게 찾을 수 있습니까? 핸들러가 필요하다면 서버 하나가 필요합니다.그룹의 어떤 RadioButton이 선택되어 있습니까 (Google AppScript)
많은 감사
이에 open issue이 있지만
여기자신의 스크립트를 약간 수정 된 버전에 적응이다 (로맹 Vialard, 가스 TC에 의해 발견)가 좋은 해결 방법은 ;-)도있다 스프레드 시트에서 실행하십시오 radioValue 항목이 텍스트 상자 또는 숨겨진 텍스트가 될 수 있다는
가function radiotest() {
var app = UiApp.createApplication();
var panel = app.createVerticalPanel();
var radioValue = app.createTextBox();
radioValue.setId("radioValue").setName("radioValue");
// var radioValue = app.createHidden().setName("radioValue") ;// choose the one you like
for(var i = 1; i < 10; i++){
var name = 'choice '+i;
var handler = app.createClientHandler().forTargets(radioValue).setText(name);
panel.add(app.createRadioButton('radioButtonGroup',name).addValueChangeHandler(handler));
}
panel.add(radioValue);
var Valide=app.createButton("Valide").setId("val");
panel.add(Valide)
app.add(panel);
//
var handler = app.createServerHandler("valide"); // this is the server handler
handler.addCallbackElement(radioValue)
Valide.addClickHandler(handler);
//
SpreadsheetApp.getActiveSpreadsheet().show(app);// show app
}
//
function valide(e){ ;// This function is called when key "validate" is pressed
var sh = SpreadsheetApp.getActiveSheet();
var RadioButton = e.parameter.radioValue;
sh.getRange('A1').setValue(RadioButton);
var app = UiApp.getActiveApplication();
return app;
}
주, 둘 다 가능성은/스크립트에
M 코드와 오픈 이슈 소스에 대한 감사의 서지. – Richi