A lookup( wizard for Panorama X

I have put together a quick emulator of the Panorama 6 lookup wizard - you can download it from

I can’t guarantee it’s bug-free so any advice on problems or suggestions for improvements will be welcomed.

1 Like

Thanks for the effort, but I am still holding out hope that possibly Jim will see that a lookup wizard like the one in Pan 6 can be built into Pan X. Think it will please a lot of folks that they won’t have to think it out on putting a forumula in for the lookup process.

Did you even look at what Michael has done? He has basically implemented what you asked for.

I would suggest that you better use info(“files”) to get a list of open databases — instead of listfiles( (that lists only files in the folder where the wizard is sitting).

IMHO there is one line missing in the .MakeLookupWizard procedure to make it work as announced:

clipboard = mgLookupContent

Correct - that’s why I described it as rough and ready - it’s derived from another app which offers to open selected files that are in the folder but not open.

Brilliant - without that, the thing doesn’t do anything! Thanks Kurt - I’ve added that snippet. The download address remains unchanged.

Yes I did. But having problems figuring it out. First of all I have my two databases open but when I go to “This search will be intiated by the … databases”, there are no databases in it, the pull down is empty. I can’t type inside of it and they same with the :I want to retrieve information from the … databases". Again this is blank and can’t type into it.

So I am having a problem with it???

I am a bit confused Michael, did you change the file that you put up yesterday???

Is it the same file name as the one yesterday, did you just override it with a new one???

Ok, I just downloaded the wizard again, but have the same problem.

Those first two boxes that I am suppose to put the databases I am searching is blank and when I try to write in it, I get a warning saying the database is not open.

So what am I doing wrong???

Sorry - I should have made it clear that the wizard has to be in the same folder as the two databases that will be compared. And, as in Panorama 6, those two databases have to be open, although the wizard will display all Panorama X databases in the folder.

Come back if you still have problems - yo are my primary audience :slight_smile:

I’ve posted a new version - the only changes are to the contents of the Help box. I believe the address is unchanged but, just in case, it’s currently:

I found time over the weekend to revisit this and I have taken Kurt’s sage advice. the wizard can now be in any location you like and it will allow you to choose from all databases which are open.

Michael,
Had some time to play with it this morning and it’s brillant, once I figured it out (sorry but not a programmer and don’t think like one) it made sense and worked. It’s a big, big help and thanks for the effort. What made it even better was the added effort to make it open as Kurt said, in any location. That makes it even better.
I hope that Jim can see that this will be of big help and put it into a future version of Pan X maybe even calling it “Mike’s lookup wizard”

Again Mike thanks for the effort to make my life so much easier.

My pleasure Sal - happy to have been of assistance. Let me know if you want help with any other problems.

Hi Michael

I got this formula back, which seems right: “lookup(“Installed base”,«Customer Code»,«Customer Code»,«Customer Code»,”")"

When I search with “formula is true” is get this error: “Execute code contains syntax error: Missing operand”

Any ideas?

I think we are missing some details here. Michael’s wizard doesn’t have a “formula is true” choice. That sounds like a Find/Select. Just what formula are you entering into the Find/Select?

The formula for a Find or Select command should be one that returns a true or false value. That lookup will be returning a customer code, so it’s unlikely that the lookup is the entire formula.

IMHO it usually does not make much sense to use a lookup( function – in other words: a completed search result – as a criterion in the Find/Select dialog.
Usually you would use a lookup( function in a Records > Morph … formula to get the found results e.g. into a field of your database.

You can use a lookup to do a selection. But you would need to turn the result into a boolean value. For example, if you wanted it to return true if there was any match in the other database, you could use this formula:

lookup("Installed base",«Customer Code»,«Customer Code»,«Customer Code»,"")<>""

Since your key field and data field are the same, simply looking for any match must be what you had in mind.

At the end of the selection, you’ll have a list of all records in the current database that also have a corresponding record in the Installed base database.

Jim - this works perfectly, thanks!

But, when I try to save this as a favorite search I get an interesting error that presents many dialog boxes that say “Contents of variable [favMenu] have not been defined.” And, if you try to reopen the find dialog to edit the statement you get multiple errors that say “ObjectAction statement can only be used in a form window.” I could not edit the formula unless I force quite and reopen everything. I disabled background search, but this didn’t help (beachball, frozen).

Hi,
Sorry for my english…
The link on Dropbox for your lookup emulator is no more available.
Would you let me use it and give me a available link ?
Thank you by advance !