Lookup( isn't returning anything


#1

After converting several databases, I am finding that none of the lookup( statements I used successfully in Pan 6 are returning anything except the default, which is usually a blank. No error messages, just no success. Looking at the documentation in both Pan 6 and Pan X, they look identical to each other and I don’t know what to do to make it work in Pan X.


#2

Do the files still have the same names they had in Pan 6, or have they had (Panorama 6) added to the name?

Dave


#3

I am seeing the same problem. A lookup in the same file (the active database) is not working. Do we have to add the file extension to the name?


#4

No, I took off the (panorama 6) part. I tried adding “.pandb” to the file name in the lookup and nothing improved. I do find that if there is an error in the formula for a text field, the error message displays in the text field, but unless the field is quite large I can’t see enough of the error message to know what’s wrong. Is there a way to see an entire error message?

I’m wondering why you would use lookup( within the same database, when you could just reference the field directly.


#5

The value you want isn’t in the same record.


#6

Interesting, never thought of needing that.


#7

I just tried a test case in both Pan 6 and Pan X. It worked in 6, not in X. I will need to do more testing to see if there are some cases where it works, and others where it doesn’t, but it looks like we have a bug.

Dave


#8

After further review, it looks like the function works if the key field and data field have one word names, but fails if there are spaces in the names.

Dave


#9

Dave is right: My field names did contain spaces. My following tests showed that the field name must not contain a hyphen, too.


#10

But: Field names may contain the underscore character _ .


#11

I’m glad you guys have narrowed down the source of the problem. My next questions is: is this considered a bug? Will it be fixed, or do I need to do some heavy renaming and editing in many files and procedures? The offending data fields are surrounded by chevrons, that used to be enough.


#12

This problem has already been fixed and should be in the next Panorama X update whenever that might be released. This is what Jim noted on Bitbucket:

The lookup( function now works correctly if the key field name contains a space or other unusual punctuation. Fixes issue #527.


#13

Thanks Gary. I got to Bitbucket once before, and I could probably have answered my own question, but I can’t recall how I got there. Can someone illuminate me one more time?


#14

Here is the page I go to: https://bitbucket.org/jimrea/panoramax/issues


#15

That’s what I’m looking for, thank you.


#16

FYI, if you sign up for a BitBucket account you can ask to be notified by email when the status of a bug changes (you tell it you want to watch that issue).


#17

I see that BitBucket is owned by Atlassian, an Australian start-up, recently listed on the NASDAQ. It’s not just Hollywood we’re taking over :slight_smile:

michael


#18

I knew that BitBucket was owned by Atlassian, but I wasn’t aware it was an Australian company. In any case, BitBucket has worked very well for this project. I also use their SourceTree program for version control.