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

Send Mail from portal row


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

Recommended Posts

Posted

I have a layout displaying a portal of customer names and their e-mail addresses. I added a Send Mail button to the portal definition (beside the address field) and configured it to Send One Email To: Table::EmailAddress. It worked fine. Press the button beside the customer's address and my e-mail client would pop up showing the correct address from that portal row, ready for me to type in text to send.

THE PROBLEM IS, I want to have that same button in the portal row call a script so that I can have other operations take place after the Send occurs. When the script executes, FMP apparently forgets which row was active and, as a result, doesn't pass the e-mail address to the client. Is there a simple way to make this work?

Thanks for any help.

Posted

Hi

yes, store the Get(PortalRowNumber) into a $$ variable before going to execute another script or into an $ variable if the script is the same.

Posted

Thanks for the response.

But how do I then use the $$PortalRow in the Send Mail script step to load the correct Table::Address?

Posted

I must really be missing something here because I've seen no change in results.

My script is now:

Set Variable [$Row; Value:Get (PortalRowNumber)]

Paste [select; Main::Message]

Go to Portal Row [select; No dialog; $Row]

Send Mail [To: Table::Address; Message: Main::Message]

The Message gets passed to the e-mail client, but the address is still blank.

Any ideas?

Posted

What are the script steps before the :P

SetVariable script step ?

How can you paste something without coping ?

Remember that the $row must be definited as the very first script step and can't go on when the script ends. Otherwise you have to use $$row !

Posted

The Paste step places the contents of the clipboard as the message text (whatever the user has selected and copied before clicking on the portal row button).

My script is only 4 steps just as shown, with the Set Variable as the first step.

Posted

I FOUND THE PROBLEM!

The Paste[select] deselects the active portal, which caused the GoToPortalRow to go to "the first portal in the layout stacking order" (according to the manual).

I took a slightly different approach and just captured the address instead of the row. My script is now:

Set Variable [$Address; Value:Table::Address]

Paste [select; Main::Message]

Send Mail [To: $Address ; Message: Main::Message]

It works.

Thanks Daniele for your assistance on this.

This topic is 6696 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.