Here is the button procedure:
global gLongDay
global gClHdgInfoDB_Teacher
gClHdgInfoDB_Teacher = array(info("trigger"), 2, ".")
let vDatabaseList = "Student Database 26-27" + cr() + "Class Heading Information"
looparray vDatabaseList, cr(), vDBName
if info("files") contains vDBName
setactivedatabase vDBName
select Teacher = gClHdgInfoDB_Teacher
showpage
endif
endloop
gLongDay = lookup("Class Heading Information", "Teacher", gClHdgInfoDB_Teacher, "LongDay", "")
setactivedatabase "Student Database 26-27"
showvariables gClHdgInfoDB_Teacher
showfields WeekOneDate
showpage
I’m a little embarrassed to show it as I’m sure it’s extremely clunky.
gClHdgInfoDB_Teacher is set by the button name, which is a teacher’s name.
In my Text Display Object, the first set of code finds the value of gClHdgInfoDB_Teacher in the Teacher field and displays the value of LongDay field.
I don’t need, or want, that data (Longdisplayed in the text display object, but when I delete that first set of code, the text display object stops updating. When I include that code, the text display object updates with every button push.
With the button push, gClHdgInfoDB_Teacher is filled with the teacher name.
The text display object will display the LongDay (e.g. Monday) and the date as a two digit day (e.g. 28).
With each button push, the text display instantly updates:
Monday 28
Wednesday 30
Tuesday 29
etc.
When I remove the first set of code, I get this with each button push:
28
28
28
I would have thought the date would continue instantly updating with or without the first set of code.
So the text display object instantly updates with:
lookup("Class Heading Information", "Teacher", gClHdgInfoDB_Teacher, "LongDay", "")+cr()+
datepattern(
superlookup("Class Headers",
{Quarter="Q1" and DayOfWeek=gLongDay},
{WeekThreeDate})
, "dd")
But the text display object does not instantly update with:
datepattern(
superlookup("Class Headers",
{Quarter="Q1" and DayOfWeek=gLongDay},
{WeekThreeDate})
, "dd")
I have three databases open:
Student Database (student demographics)
Class Heading Information (class day, period, teacher…)
Class Headers (Quarter, day of week, dates of weekly class meetings for the top of the attendance columns)
The roster form (matrix plus text display objects) is n the Student Database.
I don’t understand why taking out the first set of code stops the text display object from instantly updating.
I can get the text display object to update if I switch the form to Graphic Mode, put the smallest edit in the formula, and switch back to Data Mode.