Populating fields from clipboard data

I have a procedure that works fine in Pan6 but not in PanX. What I do is copy data from an email and have Pan clean up the data and populate some fields. In PanX I’m only getting the fields called “Paid” and “Date reserved” populated, all others are blank. What do I have wrong here?

Here is the procedure (the comments at the top show what the original clipboard data would look like):

Example of collected data in clipboard
Total $20.00
Entry Details
NAME Albert Petz
EMAIL apiiautoparts@aim.com
PHONE (631) 872-3721

local raw,prefix,wholename,prefix,first,m,last,suffix,addr,mail,phone,null,Total

;strip unneeded spaces, labels, etc.
raw=replace(raw, " ", " ")
raw=replace(raw, " ", " ")
raw=replace(raw, "NAME ", “”)
raw=replace(raw, "EMAIL ", “”)
raw=replace(raw, "PHONE ", “”)
raw=replace(raw, “Total $”, “”)
raw=replace(raw, “Entry Details”, “”)
raw=replace(raw, “(”, “”)
raw=replace(raw, ") ", “-”)


SplitLines raw,“1”,Total,“2”,null,“1W”,wholename,“1l”,mail,“1”,phone

GetName wholename,prefix,first,m,last,suffix

; populate the fields in the record

«Date reserved»=today()

The splitlines statement is incorrect. It should be:

SplitLines raw,“1”,Total,“1”,null,“1W”,wholename,“1l”,mail,“1”,phone

In other words, the “2” should be a “1” as there is only one line to be ignored (the one that originally contained “Entry Details”).

I tested this and it worked with the example data you supplied.

Thanks Jim but it still doesn’t work, only fills in those two fields. I inserted a message to display the results after all the stripping and it shows the data without the spaces and labels, I then inserted another message to display the data after the Splitlines statement and it shows empty. Curious though why it worked perfectly in Pan6 but not PanX.

And by the way, how do we get rid of the Panorama logo in message boxes or maybe reduce it’s size like Pan6 did? Or even insert our own in place?

There is some other detail you are not sharing with us. I made a duplicate of the database you described, and ran the code with the data you supplied, and it worked perfectly.

Curious though why it worked perfectly in Pan6 but not PanX.

Again, there must be some detail you aren’t sharing with us. There is no way that the code and data you supplied would work in Panorama 6.

You don’t. This logo is displayed by Apple, and applications aren’t allowed to change it. I think Apple is concerned that an application might try to trick you that the message is coming from a different application, for some sort of phishing attack.

The only thing you could do is build your own “fake” message using a form, and the rundialog statement. This would be a lot of work, but you could certainly do that.

I can’t imagine what that would be Jim. I simply ran the database under PanX and it didn’t work. So, here it is in Pan6:

Here it is in PanX:

Here is the five line example of what is copied to the clipboard from an email:
Total $20.00
Entry Details**
NAME Albert Petz
EMAIL apiiautoparts@aim.com
PHONE (631) 872-3721

What I typically do is create a new line of data for a particular show, manually type in the Show name then run the procedure which fills in the data.

My only guess is that there is a difference between the Panorama 6 clipboard and the Panorama X clipboard in that 6 uses carriage returns while X uses line feeds. Try changing the above line to:


Poossibly splitlines does not recognize line feeds the same as carriage returns.

Replace the curly quotes in the split lines row of your code with straight quotes:

SplitLines raw,"1",Total,"1",null,"1W",wholename,"1",mail,"1",phone

Then it works. (The curly quotes are often just an artifact from the forum software.)

Gary! That’s did it! THANK YOU! But that begs the question as to why such a change in the clipboard.

I believe Apple changed the standard clipboard to use line feeds along the way. I recall Panorama 6 used a proprietary clipboard using the carriage returns. Jim has accounted for this in most statements where either line ending will work but must have missed the splitlines statement.

1 Like

KJM, the code has straight quotes but Gary put his finger on it. In fact several databases I haven’t gotten to yet use some similar code so now I know to fix that one line for the clipboard. Very frustrated by all these changes.

Not in the downloaded Pan X sample database.

Oh wow you’re right! The one line has curlies, but it seems to work fine anyway.