In the past, the Show command would repaint the screen and update the text display objects on a form. For example, when editing a record in a single record form, I use Info(“Selected”) to display the number of records in that work order. If I add a new record, the text object does not show the correct new number. Closing the form and reopening does show the correct number. Likewise, in a View-As-List form, when selecting a different work order, the dates and times in the header will not update to display the new values. If I close the form and reopen it, the text displays are correct.
I use Info(“Selected”) to display the number of records in that work order. If I add a new record, the text object does not show the correct new number.
You can’t do it that way.
Panorama only updates a Text Display object when a field or variable displayed in the object changes. Since your formula doesn’t contain a field or variable, it will never update.
To get around this, you need to add a database field to the formula. For example, if the database has a field named Qty, you could use a formula like this:
info("selected")+Qty
A Text Display object with this formula WILL update whenever the position of the current database changes, which will happen if you do a selection.
Of course the problem with the formula above is it displays the wrong value - you don’t want the number of records PLUS the quantity, just the number of records. One solution would be to adjust the formula so that the Qty is both added and subtracting.
info("selected")+Qty-Qty
Another way to do this is with the ignore( function, which is designed for this purpose. This formula displays the number of records correctly, but will also update as needed.
info("selected")+ignore(0,Qty)
in a View-As-List form, when selecting a different …, the … in the header will not update to display the new values
It’s not possible to update values in the header of a View-as-List form. If you need this capability, use a regular form with a Text List or Matrix object, with the Database Navigator option enabled.