Info("focusobject") not working properly in Text Editor Objects

pattern(): (when Number is either a numberic field or a variable)

?(info("focusobject")="Number",Number,pattern(Number,"#,.##"))

datepattern(): (when Date is a date field)

datepattern(Date,?(info("focusobject")="Date","","Day, Month ddnth, YYYY"))

wrong pattern when the editor is closed
wrong pattern when the editor is opened with a mouse click
correct pattern when the editor is opened with a key

Also, pattern(Number,“”) is equivalent to pattern(Number,“#”) in Pan X. It would be great if it can show numbers without any pattern as in Pan 6.

datepattern(): (when Date is a variable)

datepattern(Date,?(info("focusobject")="Date","","Day, Month ddnth, YYYY"))

correct pattern when the editor is closed
correct pattern when the editor is opened with a key
wrong pattern when the editor is opened with a mouse click

For text field or variable:

?(info("focusobject")="?",Field,"")

displays FieldA whether the editor is open or not

?(info("focusobject")="?",Varialble,"")

displays the correct data most of the time

Let’s slow this train down a bit and look at the first example…

pattern(): (when Number is either a numberic field or a variable)

?(info("focusobject")="Number",Number,pattern(Number,"#,.##"))

While I will admit that the example in the Help file is not a perfect example, the function Info(“focusobject”) returns the name of the active text editor object.

Have you named each of your text editor objects? In the pic below, I did something that is not all that often done. I have given a Text Editor Object a name.

This allows me to later know which Text Editor Object is currently being edited.

I am not thinking that you are aware of how the info(“focusobject”) function is supposed to work. Tell me I am wrong. :wink:

Tell us what you are attempting to accomplish in your first example.

I think he is trying to display the value in a text editor object differently depending on whether or not the object is being edited. You can’t do that, full stop.

This always worked in Pan 6. Are there any alternative methods?

This is not something that was ever intended or documented. If it worked that way in Panorama 6, that’s nice, but there is no guarantee that all undocumented behaviors in Panorama 6 will work the same in Panorama X.

Honestly I am pretty shocked that this ever worked.

Worked consistently regardless of the editor’s opening or closing methods or the complexity of the formula.