Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Send Mail from portal row

Featured Replies

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.

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.

  • Author

Thanks for the response.

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

With:

Go to Portal Row (by calculation and calc: $$row)

Send One Email To: Table::EmailAddress.

  • Author

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?

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 !

  • Author

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.

  • Author

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.

Hi

happy that you solved... but, hei, you didn't say to me that there was more than a portal ! :P

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.