Can't Sort Hidden Fields

I’m seeing that a procedure can’t select a hidden field (attempt generates an error) so one can’t sort a database on a hidden field. Double checking that I’m not missing something??

I’ve never tried that so I’m not sure, but that doesn’t sound surprising to me.

It’s Christmas so I’m not going to test this, but I think you could use a secret window do do this.

window info("databasename")+":SECRET"
field "any field"

You didn’t specify Panorama 6 or X but I think both the problem and solution apply to both versions.

Thanks! My question pertained to PanX. The key fact I was missing was that hidden field status is only applicable when the data sheet in on top. I couldn’t get the secret window approach to work, but opening a visible form at the beginning of the procedure and closing it at the end allowed the sort to work. I just used a simple form with a text display that says “Sorting…” Thanks for steering me in the right direction!!!

Procedures that run just fine in every other window of a database have errors when trying to perform processes on a hidden field if the active window is the Datasheet.

The error is: Field “x” is not visible in current window

If you use noshow before your code and showpage & endnoshow after it should work properly.

I am surprised that this works, but I just tested it and it does in fact work.

This error message is correct. It comes up when the “Field” statement is used, since Panorama is unable to set the current field to what you requested. In fact, early versions of Panorama X would allow this, then sometimes crash. So this error check was added.

I’ve had the thought in the past that it would be nice if statements like sort and formulafill could work on a field other than the current field. That would get around this issue. But this hasn’t gotten anywhere near the top of the “to-do” list.