Text Display Object update inconsistent

I have a Text Display Object that is set to Formula Mode and contains the following formula: "Version: " + «fgVersion». The object is updated with a procedure that updates the FileGlobal variable, fgVersion, with a date in text format. Sometimes the procedure updates without any problem, and other times it refused to update. Yes, I am using a ShowVariables statement at the end of the update procedure. When the last statement in the procedure is Message fgVersion, the message displays correctly, but the TDO will or will not update depending on the weather or the mood trending that day. I apologize for the sarcasm. I know I am probably doing something wrong that no one else would ever consider. I can ultimately get the object to update by going into Design Mode, clicking on the formula inside the object, and then back out of Design Mode.

With such limited information, I’ll have to guess. The showvariables statement only works for windows associated with the currently active database. If some other database is active (for example if you are using a “secret” window), the Text Display object will not update.

Strangely, at this moment I have a file that has a Text Display Object that does not work. The formula is: "Version: " + «fgVersion». I can run code that will change the value of fgVersrion, but the TDO does not update. Here is an example of code used to update the TDO for testing:

Local K, N
N = Info(“DatabaseName”)

fgVersion = “”

showVariables fgVersion

If fgVersion = “”
K = “Hello World”
Else
K = "Version: " + fgVersion
EndIf

Message info(“databasename”) + cr() + K
Stop

Going in and back out of Design Mode has no affect. However, if I go into design mode, click anywhere within the TDO formula pane, and then exit Design Mode, the TDO will update as it should. Unfortunately, I have not been able replicate or re-create at will the problem where the TDO will not update. It seems to happen quite randomly, and I am now watching more diligently to see what might cause it to fail. I have been experimenting with chevrons around the variable, but that does not seem to have any affect.

James, I made a little test DB following your recipe with one exception: I included the definition of the fileglobal variable into the test procedure. As you can see, there is all working as expected:

So I am wondering what else is causing this issue for you. Is this Text Display object perhaps on a Header tile of a View-as-List form?