I'm trying to load values retrieved from ScriptDb into an interface application developed within an interface built with GUI Builder. I've loaded the interface via:
var app = UiApp.createApplication();
app.add(app.loadComponent("ScriptDBUi"))
Now that it's loaded I would like to load values into text boxes to display ScriptDb values, however when I try to use setValue
or setText
, I'm notified that properties can't be changed or modified.
Can you point me in the right direction to be able to interact with UI elements?
Here's some additional code:
function ReadScriptDb() {
var DB = ScriptDb.getMyDb();
var Ob = DB.query({Number: "0002"}).next();
var Ui = doGet()
var TextBox = Ui.getElementById("Project")
TextBox.setText(Ob.Project)
}
function doGet() {
var app = UiApp.createApplication();
app.add(app.loadComponent("ScriptDBUi"));
return app;
}
I've then published this simple script as a Web App so I can test the Ui. After publishing i'll get 1 of 2 things depending on my changes: 1 - The text block doesn't update with the value returned (..i've debugged to insure that Ob.Project is returning a string value), or I've been prompted that i cant assign or modify a value.
Thanks for any insights you can offer.