When using Procedure Style Formulas, I have a procedure in the Equation field that does not trigger when I tab out of a field.
ie. I start typing, I hit Tab and the formula does not trigger.
as opposed to…
I start typing, I hit ‘Return’ or ‘Enter’ (same key), and the procedure does get evaluated.
Any suggested fix for those times that the user chooses to Tab out?
I just tried this, and for me, a tab key always triggered the procedure. The field I was tabbing out of was treated as the active field while the procedure ran.
We may need to know what the procedure does in order to determine why it isn’t triggered, or why it was but didn’t leave any evidence that it had been.
I can confirm Dave’s results in that the tab key always triggered the linked procedure. The only way I could get Robert’s behavior is if I filtered a tab key out in the procedure as with:
if info("keycode")=48 // trap the tab key
stop
Else
message info("keycode") // run procedure
endif
If I enter a name in the «Site Name» field, and press tab, no ‘Site Number’ gets looked up and nothing gets entered into «Site Number» field.
If I enter a name in the «Site Name» field, and press the ‘Enter / Return’ key on a MacBook Pro 2016, the lookup happens and I get a result in «Site Number».
I created a database named Station Stats with SiteGVR_ID and Name fields, and a Test database with Site Name, Alarm Type, and Site Number fields, in that order. Procedure was named .LookupSiteNumber, and it had the same two lines of code.
The Return, Enter, and Tab keys, all produced the same result. The site number appeared in the Site Number field, and the Alarm Type field became active.
I have no idea why we are getting different results.
Thank you Dave (and Gary) for attempting to duplicate the problem.
As Dave mentioned that he used both the Return, and the Enter keys, this leads me to believe that he is not using a MacBook Pro. I am guessing that that key may be mapped differently on the MacBook Pro. As Jim has recently purchased the same computer, perhaps he will find the key mapping is different.
Unless our resident genius knows how I might determine this on my own. (What say you Dave?)
I don’t know if it matters. I’ll test again when I get a chance. The fields aren’t in the order you said they were. In my test, Alarm Type was between Site Name, and Site Number.
From your video, it looks like tab is triggering the procedure, because the tab key alone would have left you in the Site Number field. To get to Alarm Type, the Field command in your procedure had to have been executed.
For greater clarity, I’ve entered 2 additional records in the Station Stats table. One that has Return and one that has Tab as their looked up values. They each also have their resulting values noting what key was used. Only the Return key’s value comes back to the initial table.
Here again is the code:
«Site Number» = lookup(“Station Stats”,“Name”,«Site Name»,“SiteGVR_ID”,"",0)
Field “Alarm Type”
Try as I might, I can’t duplicate your results. I changed the order of the fields to match those in your video. I added Clairvoyance linking. It continues to work just as it should.
Very interesting. To me, I am imagining that the order of the 2 lines of code shouldn’t make a difference in the end result but of course it does!
When using the Tab to proceed after entering a value in the first field, the result is to end up in the 2nd field with Panorama waiting for a user to enter a value in the ‘opened’ cell. I then entered Tab again, and it proceeded to move to the 3rd cell where upon hitting Return, it entered all values.
When using the Return key, all worked as I believed it should.
While I do accept that the Classic Panorama will not be updated for this sort of thing, I am kind of hoping that finding these items can perhaps thwart Panorama X from pulling them forward.