Hello,
I am developing in App Inventor this application. So far all texts is in Hungarian.
These two images below are taken in Designer. There is a DataPicker Keltezés: , label Keltezés?, three spinners ( for each spinner there is a label for it out there ), three buttons: Ment, Betölt, Tanuló, then more labels and below each label a textBox, and one Image component out there.
In Blocks I have these block ( see below ).
When Ment.click then should save in the database the following values: label 'Keltezes_', the selected Items of spinners 'Orarend', 'Osztaly', 'Ora', label 'het_sorszama', the text in textBoxes 'HianyzokNevsora', 'TanitasiEgysegSzovege', 'OktatasiCelokSzovege', 'NevelesiCelokSzovege', 'AzOravazlatSzovegeBeirva', the Image in 'MegjelenitettKepek', and the text in textBox 'NaploAzOrarolSzovege'.
What I want is following. When the button 'Betölt' clicked, to get back stored data from the database and to put these datas in to corresponding labels, spinners, textBoxes.
Is this possible? If yes, how can I do it?
I attached here the exported project to my computer.
Best, from Pali


I think you need to take a step back and consider what one of your database records will contain. To start with there will need to be a unique reference or ID to use as the "tag".
Which database are you planning to use?
I am planning to use TinyDB.
StephenOne raw of the table contains one school week with these columns, from left to right:
the month, teching theme, the number of school period ( not
period-block! ), goals of this teaching theme, the number of
period-block, the teaching unit, which quarter of school year is
this, type of the class ( here the class not mean eg. 5a, 6a Classes,
but a school period, and can be eg. new curriculum, practical work,
etc. ), Educational form (
eg. head-on, individual ), educational method ( drawing, dialog,
demonstration ), educational tools ( eg. jigsaw, wood ), workpiece (
eg. Cartoon technical drawing ).
In Class Syllabus the
are 36 raws out there and the heading raw abowe these raws.
Can you store the lesson plans as Google Docs or some other web based document?
The app could track meta data about the document, like language, and its name and sequence, and URL.
Also, the teaching goals that come from the Ministry ...
Is it a small list that you would select from in describing each lesson plan? If so, keeping them in a separate table to populate a List Picker would be helpful when setting up lesson plans.
The notation you used in the Dia tool is cumbersome and does it really create SQL for you?
There was a good E-R model in the making.
If you have .sql, is it exported sql statements? In that case look for the stored internal format and use that file instead.
SQLiteManager: Error in opening file TLPsD.sqlite - either the file is encrypted or corruptWhat can I do to solve this problem?
Exception Name: NS_ERROR_FILE_CORRUPTED
Exception Message: Component returned failure code: 0x8052000b (NS_ERROR_FILE_CORRUPTED) [mozIStorageService.openUnsharedDatabase]
CREATE TABLE "cohort" (
"id" INTEGER CONSTRAINT "pk_cohort" PRIMARY KEY AUTOINCREMENT,
"cohort_id" TEXT NOT NULL,
"gradelevel" TEXT NOT NULL,
"headteacher" TEXT NOT NULL
);
CREATE TABLE "student" (
"id" INTEGER CONSTRAINT "pk_student" PRIMARY KEY AUTOINCREMENT,
"studentid" TEXT NOT NULL,
"firstname" TEXT NOT NULL,
"lastname" TEXT NOT NULL,
"cohort_id" INTEGER NOT NULL REFERENCES "cohort" ("id")
);
CREATE INDEX "idx_student__cohort_id" ON "student" ("cohort_id");
CREATE TABLE "teachingunit" (
"tunitno" TEXT NOT NULL CONSTRAINT "pk_teachingunit" PRIMARY KEY,
"language" TEXT NOT NULL,
"tutitle" TEXT NOT NULL,
"gradelevel" TEXT NOT NULL,
"teachinggoal" TEXT NOT NULL,
"educationalgoal" TEXT NOT NULL
);
CREATE TABLE "lessonplan" (
"id" INTEGER CONSTRAINT "pk_lessonplan" PRIMARY KEY AUTOINCREMENT,
"cohort" INTEGER NOT NULL REFERENCES "cohort" ("id"),
"classroom" TEXT NOT NULL,
"lessondate" DATE NOT NULL,
"timetable" TEXT NOT NULL,
"schoolweekno" TINYINT NOT NULL,
"sessionblock" TEXT NOT NULL,
"teaching_unit" TEXT NOT NULL REFERENCES "teachingunit" ("tunitno"),
"diarynotes" TEXT NOT NULL
);
CREATE INDEX "idx_lessonplan__cohort" ON "lessonplan" ("cohort");
CREATE INDEX "idx_lessonplan__teaching_unit" ON "lessonplan" ("teaching_unit");
CREATE TABLE "missingstudent" (
"id" INTEGER CONSTRAINT "pk_missingstudent" PRIMARY KEY AUTOINCREMENT,
"lesson_plan" INTEGER NOT NULL REFERENCES "lessonplan" ("id"),
"student" INTEGER NOT NULL REFERENCES "student" ("id")
);
CREATE INDEX "idx_missingstudent__lesson_plan" ON "missingstudent" ("lesson_plan");
CREATE INDEX "idx_missingstudent__student" ON "missingstudent" ("student");
CREATE TABLE "studentgrade" (
"id" INTEGER CONSTRAINT "pk_studentgrade" PRIMARY KEY AUTOINCREMENT,
"grade" TEXT NOT NULL,
"gradedate" TEXT NOT NULL,
"note" TEXT NOT NULL,
"diligence" TEXT NOT NULL,
"workpiece" TEXT NOT NULL,
"bringequipment" TEXT NOT NULL,
"behavior" TEXT NOT NULL,
"lesson_plan" INTEGER REFERENCES "lessonplan" ("id"),
"student" INTEGER NOT NULL REFERENCES "student" ("id")
);
CREATE INDEX "idx_studentgrade__lesson_plan" ON "studentgrade" ("lesson_plan");
CREATE INDEX "idx_studentgrade__student" ON "studentgrade" ("student")
Whatever works best for you.
on first run of your app just create your tables (CREATE TABLE statements) and use some INSERT TABLE statements to add some dataFirst run of an app. I do not understand this. First run after installation of the app? Can an app detect whether is it's first run or not?
Can an app detect whether is it's first run or not?
Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by
Taifun.