Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7801 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

I have an e-mail address database that 5 other files need to have access to. I'm using the SMTPit plug-in to facilitate e-mailing from these files and in the 1st db, I've scripted an "add" button that opens the e-mail db, allows the user to select a recipient and then pastes the e-mail address in the To field. This works great with the first of the 5 db files but I can't figure out how to make it work with the others. I can script opening the e-mail db but when I select a recipient I'm taken back to the 1st. database (because that's where the script tells it to go). I need to figure out how I can tell the e-mail db which of the 5 db's to return and paste to. Does that make sense? So if instead of db 1 the user is working in db 3 and needs an e-mail address, how can I script the copy/return to db number 3/paste e-mail address?

I hope this is understandable and thanks in advance.

Joe

Posted

Hi,

Create a global field in your E-Mail db called PasteDatabase

Create 5 scripts in this database:

Set Paste DB1

Set Paste DB2

Set Paste DB3

Set Paste DB4

Set Paste DB5

These scripts are simple, just set the global field to DB1 etc

So Set Paste DB1 would contain:

Set Field [PasteDatabase, "DB1"]d

Now when in your other databases you need to add a script step to the add email script

You need to add - Peform External Script and select the relevant script in the E-Mail DB

Now in the script that performs the paste rather than telling it to paste into DB1, tell it to paste into whatever is in the global field.

So what would hapen now is:

Imagine you are in DB3 and need an E-Mail address, you press the button and it takes you to the E-Mail DB and sets the global field in this DB to "DB3" by calling the script "Set Paste DB3"

You select the recipitent and it calls your original paste script but rather than it pasting into DB1 it pastes into DB3 (picked up from the global field)

OK, I have just re-read this and it is possibly the worlds worst explanation! I will put together an example and post it in a short while

Ed.

Posted

Ok, enclosed is the example.

Hope this helps you.

I had to change the original idea slightly. I forgot you could not specify which file to open based on the contants of a field.

So what I have done now, is dependant on which database you start from (1,2,3,4 or 5) you end up at a different layout. The layout then knows which DB to go back to in order to perform the paste.

Anyway, have a look, see what you think and let me know if this helps.

Ed

GetEMail.zip

Posted

Eddy,

You're awesome! Thank you so much for taking the time to put that example together for me. That's exactly what I need, and way beyond the call of duty. If I were in Manchester right now I'd buy you as many pints as you could handle (that is, of course if you partake in finest beer in the world)! So instead I'll raise my Corona (it ain't bitter but it's all I got) in a toast to EddyB.

Thanks again Eddy, you really made my day. laugh.gif

Joe

Posted

No problem Joe! Glad it helped you!

I'll accept an I owe you for the pints! Boddingtons brewery is only about 20 minutes away!

Ed.

  • 2 weeks later...
Posted

EddyB said:

No problem Joe! Glad it helped you!

I'll accept an I owe you for the pints! Boddingtons brewery is only about 20 minutes away!

Ed.

Consider yourself owed! I just got around to implementing your solution into my database. I had to fiddle around a bit to fit it to my db but then it worked flawlessly. I would never have thought to do it that way. Thanks again Eddy, you saved me a ton of time (had hair I would've pulled out in the process wink.gif).

Boddingtons eh? I haven't had one of those in a few years. Well hopefully I'll get back to England one of these days and rest assured you'll be enjoying a few Boddingtons on me. smile.gif

Joe

Posted

20 miles away? more like 5500 miles from me! Drove past it on the way from London to Edinborough. Anyone who has not driven through the English countryside is missing something special. In England it was all about Boddingtons, but in Scotland I asked them if they had it and the bartender wrinkled his face at me and said "That's an ENGLISH beer!"

Posted

Even worse happen to my friend. He was ordering "glass of Scotch" for many years, and suddenly, in Ireland his mouth was faster than his brain and to his horror he heard himself saying -- "glass of Irish Scotch"!

smile.gif

This topic is 7801 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.