Find/Select Dialog Logic Error

I’m getting the following error every time I try to choose a specific field to search in a database. This is even after restarts.

The field obviously exists and is set for Text but nothing else in particular.

The Find/Select dialog does not work if the database is locked down so that the user can’t modify the design. This is a known issue.

In this case, the database is not locked down nor is it locked to any account.

It’s one specific field of the three fields in the db that cannot be selected.

I guess you’ve run into a new problem. I created a database with a CPT Code Description field and it worked fine. If you want me to investigate further you’ll need to send me a database with exact instructions.

The problem is with the name of the CPT Code Description field. The second space in this fieldname is actually NOT a space, but rather an Option-Space. Panorama is actually fine with this, it will take any character. However, it appears that Apple’s menu code is converting the option-space into a regular space. So when you choose this fieldname, the internal code is getting a corrupted version of the name. So though as you say the field “obviously” exists it actually doesn’t exist.

I don’t think there is any way to fix this in Panorama, and someone at Apple probably thinks this is a feature so I don’t think they will be fixing it. However, it’s probably a bad idea to have a field name with a non-space space in it, so my recommendation would be to edit the field name to put in a regular space. I tried that and the error message went away. However, if you have any procedure code with this field name it will be a bit more complicated - you’ll have to find every occurrence of the field name and fix it.

Sorry for all the trouble then. This was imported data and presumably that’s where the Option-Space got installed. I wouldn’t knowingly do it myself.

I have also just run into problems with the Find/Select dialog. I keep on receiving an error “Internal error in dialog logic. CALL statement failed, procedure queryFieldChanged does not exist”. Here’s the query.

I cannot duplicate this error. However, if your copy of Panorama was damaged it could cause this error. I would suggest throwing your current copy of PanormaX.app into the trash and downloading a fresh copy from provue.com (click on Download Trial and follow the instructions).

Thanks Jim. I did as you suggested - deleted and new download.

So, it worked for one select. Then I tried to do the same select having selected reverse (thus a bigger dataset) and ended up with behaviour I also saw yesterday but did not report at that time with the following dialog.

image

At this stage also, the ability to quit Panorama was lost:

Screenshot 2024-05-01 at 10.48.26

I will mention that the database I am looking up to was, under Pan 6, once upon a time a shared database. I think I’ve seen something on these pages that this can cause problems. But I have taken no steps to share in Pan X. And there is nothing in the file’s security or server options to suggest it is anything other than a single file.

That should not make any difference.

Since you couldn’t quit I assume you force quit. Then what happened when you tried to run it again? Did it run once, or never worked again?

I don’t know what is causing this problem for you. Instead of using the Find/Select dialog, you might want to try writing a one line procedure to do the selection. It would simply be:

select lookup("RG UniversalX","ID",ID,"Location","",0) = "London"

Note that I also changed «Location» to "Location". I’m not sure if using «…» is a problem but I am absolutely sure that using the quotes will work.

Thank you Jim. Playing around with this, it seems the problem is the (over?)fancy way in which the dialog calculates and shows you a preview of the matches.

If I enter the formula and click select, it will inevitably error if I do not wait for the recalculation of the little snippet of text below the [Cancel] [Find] [ Select] buttons ( xxx matches from yyy records) to finish calculating. If I click [Select] while that number is still incrementing (and it takes about 25 seconds to do so) then it errors. If I wait for it to do its thing, then all is well.

Maybe consider binning that embellishment. In its current state, it just seems to really slow things down and remove or delay functionality that’s essential to any DB? Perhaps that’s why you suggested using a Procedure rather than the dialog?

BTW, you made mention of not knowing whether it mattered if I used {"} or I {«} to delimit the field to be retrieved: ie “Location” or «Location». It didn’t matter - in both cases it turned out it was whether I waited for the dialog to have finished the pre-lookup.

(But, the fact that you suggest that I might use either character in this formula seems weird, as Pan 6 gives very different responses depending on which of those delimiters is chosen?)

As I mentioned before, I could not duplicate this problem. I set up two databases and did a selection with a lookup( between them, and it worked fine. From the information provided, I do not know why you are encountering these problems.

This “embellishment” has been in Panorama for over 20 years, and no one else has reported any problems with it. I personally rely on this and use it all the time – often it’s not necessary to actually perform the actual selection. I’m sure if this feature was removed there would be quite an uproar.

That said, doing a lookup( inside of the selection formula is definitely going to massively slow down both the preview and the the actual selection.

Since you are simply typing in a formula (rather than using the various pop-up menus) you really aren’t getting much benefit from the dialog, so I simply thought it might be simpler for you. Ultimately the dialog is constructing a temporary procedure and running it, so I was merely suggesting that you might want to cut out the middleman.

The lookup( function is a special case, it has it’s own special handling of how these characters are handled. Basically it is designed to be more forgiving since it knows what each parameter is intended for.

Thanks for that further information Jim.

Can I just check something to make sure I’m understanding what you are saying. You say that the “embellishment” has been in Panorama for 20 years. I am a little hesitant to question “The Creator” of Panorama, but I’ve been using Panorama for over 30 years now, and have only seen this since the advent of PanX? In Panorama 6 the dialog looked like this -
Screenshot 2024-05-14 at 12.04.52

There was no kind of preview of the data you were going to get or readout saying xxx matches from yyy records.

On an allied point, please consider reinstating “Formula Find/Select”. I make endless lookups between ad hoc datasets and that dialog majorly speeds things up compared with the current PanX arrangement. In addition to being able to dive in and enter a formula directly, having separate buttons for [Select] [ SelectWithin ] [ SelectAdditional ] is much quicker than having to select from a drop down each time.

I do miss the ⌘L - Select Within, and the ⌘M - SelectAdditional in the old dialog. But like the Design Sheet, I do not see them coming back.

In Panorama 6, if you chose ‘Use “Classic” menus’ in the General Preferences,

then this menu choice


produced this dialog.

If you did not check that option in the Preferences and did check “Enable Live Preview”,


then this menu choice

produced this dialog.

Ah, thanks Dave - it seems I’m even more old school than I realised.

I see a handy checkbox saying “Live preview”. If you tick that, does it avoid the record counting and previewed data?

No such option exists in Pan X. Would be great if it did, then you wouldn’t have to wait for it to complete its thing.

If that box isn’t checked, it doesn’t do the preview. Being able to do that was occasionally useful if the formula buffer would overflow.

As I mentioned before, it’s trivial to create a procedure and then directly type in the formula. Then when you’re done you can delete the procedure if you wish. You don’t even have to ever give it a name. It would take you less time than it took to type up this request!

If you want selectadditional or selectwithin, just type that instead of select.

Panorama X doesn’t have that option because the preview is done in the background. You don’t have to wait for it (I know you are claiming you do have to wait, but I cannot duplicate that, and no one else has reported that. In Panorama X it is definitely designed so that you shouldn’t have to wait. This was not true in Panorama 6, hence the need for a checkbox to potentially disable the preview.)