Problem with Header updating in View-as-List

Note that this issue is for Panorama 6. I’ve seen this problem in Pan X but have accepted that it will not work there; I have done this successfully in Pan 6 before, but now when I am constructing a new form in Pan 6 it has the same problem as X.

I have a View-as-List form that has some data in the Header tile that is updated whenever the active record is changed. Specifically, it does a lookup( of a company name based on the Account Number in the record that is currently selected. In a form I built some years ago (before Pan 6), this header info is updated immediately as I click on different items in the list. Now I have build a new form in a new database, trying to do the same thing. The header starts with info from some record it saw earlier, not having anything to do with which record is currently selected. I can click different records and the header doesn’t change. If I go to Design mode, then back to Data, it updates correctly, but does not update further if I click somewhere else.

I cannot figure what I may be doing differently in this new list that makes it not work.

I got this to work by giving the database a .CurrentRecord procedure and putting a ShowFields command in the procedure, naming the field with the key value. In your case, that would be the Account Number.

That made me look at my other database where this was working and sure enough, I had a .CurrentRecord procedure with “show” in it. I found that a simple “show” does it in the new one, but only if I’m scrolling between records (same outcome if I use the showfields command you suggested). The problem is that it does not update the “current” record when I first open the database (it shows whatever was in there before), so if there is only one record for that account it will be wrong and it can’t be corrected since there can be no scrolling (graphics mode then data mode will update it). I tried ..ActivateForm with the same command but it seems to have no effect. I didn’t use that at all in the old database that works at all levels. What am I missing?

Note that my text shows 3 dots before ActivateForm, but I really typed just 2 dots as it should be. I can’t find Pan 6 documentation on this procedure name.

This can’t be true. When a form opens, all the formulas in all the objects are evaluated at that time, and if they weren’t, there would be no result showing at all. It definitely has no memory of what it was displaying the last time the database was open. I think you are probably doing a Select, after the form opens, and that’s not triggering the .CurrentRecord procedure.

If you have a procedure that is doing the select, have that same procedure do the Show or ShowPage right after the Select.

The documentation is on page 396 of Formulas & Programming.

The ..ActivateForm event handling procedure is triggered when any form in the same database as the procedure is activated (brought to the front). It doesn’t matter how the form is activated—manually (by clicking on it) or as part of a procedure (usually the window statement).

Since this procedure is activated when the form comes to the front, rather than after the select, it’s not any help.

The same thing happened to me. I corrected it by escaping the second dot, by putting a \ in front of it, and then I corrected yours as well.

I misspoke when I talked about “first opened the database” when I meant “first opened the form” when the database was already open. Your comment about “can’t be true” was right on if the database had not already been open. My “old” procedure in the old database was written over 12 years ago and much of my development effort is a distant memory. Your suggestion to put “show” after the select did the trick, and I looked at my old procedure and it did “show” in both of the places you suggested. You da man, Dave, and maybe now I am.