Popup Button blank at launch

I have two files exhibiting the same behavior. When I first open either file, with my main entry form visible, as usual, one of the popup buttons is blank, and scrolling through the records has no effect, the button remains blank. BUT, if I click the button, the menu pops up, I don’t change the value, and the value now remains displayed when I let go of the button. Then, scrolling through the records, the button displays correctly, flashing through the values as the records change.

(The button is simply displaying a global variable that contains an array, and yes, I will try to get rid of my global vars eventually, but there are an awful lot of them…)

Closing and reopening the file may not exhibit the problem, but if I quit Pan X and reopen the file, the bad behavior recurs.

Another way to “jog” the button into submission seems to be just entering Graphics Mode, then back to Data Mode. Or, switch to a different form, then back. Is there something we need to do to initially Refresh the form that first appears when a file is opened?

Without more detail, it’s kind of a blind shot, but it sounds like you need to declare a value for the variable, then show it in your Initialize.

MenuValue = “xxx”
ShowVariables MenuValue

Huh? If it’s displaying a variable, why would it update as you move from record to record? That would only happen if displaying a field.

Maybe you mean it displays a field, but a global variable contains the list of menu items? That might match your symptoms. The problem, is, the form is opening before the global variable is defined. So naturally it displays blank (in Panorama X, a pop-up menu can only display values that are in the menu list, if there is no menu list, it will always display blank).

Presumably you have code in the .Initialize procedure that sets up the variable. You’ll need to add a showvariables line after assigning the value.

My mistake, much apologies for my lack of detail. Jim & James are entirely correct, it is displaying a field, and the variable contains the list. showvariables fixes the problem, although in one case I was being very “clever,” the list of items was being created INSIDE the popup formula, so obviously it did not get initialized until the first time the menu was opened. In that case, I realized I needed to move the formula into the .initialize proc and show the variable.

Thank much!