TDSO Not updating


I’m sure this has been discussed before … but, I could not find the solution I need either in QNA or here.

I have a TDSO that contains:

pattern(info("Selected"),"#")+"/"+pattern(info("Records"),"#,")+" records selected"

After any search/find/select operation, the updated number of selected records is not reflected in the TDSO.

How can I fix this?


– Mark

Your formula has no fields or variables. When a field or variable changes, Panorama will update any objects with formulas that reference that entity (in the case of a variable, you must use the showvariables statement). But in your case, there are no fields or variables. Panorama is not smart enough to recognize that the formula contains info( functions whose values have changed.

The solution is to add a “dummy” variable to the formula, for example:

recordCountChange+pattern(info("Selected"),"#")+"/"+pattern(info("Records"),"#,")+" records selected"

In the .Initialize procedure, make sure this variable is created and initialized to an empty string:

fileglobal recordCountChange
recordCountChange = ""

Then, after you do a select, force this variable to update:

select somefield="some value"
showvariables recordCountChange

Of course, this will only work for selections done by your code. There is no way to get this value to update when the standard Find/Select dialog is used, sorry.

If you are using Panorama X, you can skip the part about the .Initialize procedure. You don’t actually have to create the variable. Just use the catcherror( function in the formula in the Text Display object, like this:

catcherror("",recordCountChange)+ rest of forumula

Even though your variable doesn’t have a value or even exist, you can still update its display with showvariables! I actually use this trick fairly frequently.

1 Like

That did the trick nicely.
Thanks … :slight_smile: