TAB key not advancing to next field after procedure enters value

Sorry, this is not a good description in the topic.
I am a decades long Panorama user on latest MacOS. Panorama 10.2.0.b25. But very casual user of Procedures.

One of my databases is used to record gigs I played. In it there is an integer field used to record travel distance. This is filled automatically by a procedure which looks up the milage in another open database. If the gig location isn’t found there, the procedure enters a ‘0’ in the distance field. Recently, after the latest Panorama X update, this happens:
When gig location isn’t found in the other database ‘0’ is entered, as it should. But now Tab/Return doesn’t advance to the next edit field. Instead, I have to click on the next field and the distance field looks like this: '0 '. As if a zero+tab or spaces was entered. Even after deleting the contents of the distance field and entering anything manually, Tab/Return won’t work for this field anymore - until I save and reload the database.

Here’s the code segment. I have used this for countless years:

find Location = myLocation AND City = myCity

if info(“found”)
message “not found”

openfile “Gigs”

Miles = myMiles

Any code that switches windows is bound to interfere with the tab process. You say this used to work, I find that very surprising – it should never have worked.

Fortunately, you can replace all of this code with a one line formula using the superlookup( function.

I don’t have access to your database but I think the formula you need would be something like this:

Miles = superlookup("Another Open Database",
    {Location = «Location» and City = «City»},

Of course you’ll have to adjust the database name and possibly the field names, I have assumed that the Location, City and Miles fields are the same in both databases, which seems to be what your code implies (though clearly you didn’t post the entire code).

Alternately you could also set up a relationship between the two databases and then simply use the related( function.

Thanks. I appreciate your help. Much better that way - but, I swear, this has been working with the “wrong” code for years. Last time I looked at that procedure was when I switched to Pan X.

Unfortunately I am still getting the same effect described in my original post:

  1. After the procedure inserts a found value (Miles) into the field, I can tab/return to the next field.
  2. If “0” Miles is inserted, it looks like a tab is after the “0” and pressing tab or return doesn’t get me to the next field.
  3. If I now try it again and a value for Miles is returned, it is inserted but again with tab.
  4. Like there is now a “magic” tab in the Miles field until I close and re-open the database.
    Maybe don’t use the tab key to move to next field?

I’m sorry, but I cannot follow the steps you are describing.


First screen cap. After filling in City, procedure is triggered to lookup Miles. Miles are inserted into the Miles field. Pressing TAB should advance to next field but seems to insert TAB character.

All fields in this form use the TAB key to advance - like here.

And, yes this has worked fine for years.

Sorry to bother you with this.

Putting aside your question about tabbing, if you do not intend to edit the miles after they are looked up and inserted, you could use a Text Display Object to show them. Then you would advance to the next field (money) and skip miles.

Probably would have been more helpful if you showed us the editor options of the Miles field. I’ll bet that Tab is not checked as a Termination Key for that object.

TAB key is checked as Termination Key. It works as it should right after I open the database on a newly added record. When I add another record it will add the TAB character into the field and not terminate (neither will the Return key, which is also set to terminate).

If you would like me to look into this, please compress the database into a .zip file and email it to support at provue dot com.