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.

-mailformat file not getting portal values

Featured Replies

Hi All,

I simple question, I hope. I have database of meeting minutes which a user can view over the Web. I would like to be able to allow team members to be able to email the minutes to others. Everything works great until the email is sent.

The email contains all the fields that are in the database being queried but none of the portal informaion. Here is the code of the format file.

FORMAT FILE - meeting_minutes.txt

Project: [FMP-CurrentToken:4]

Project #: [FMP-CurrentToken:3]

Date: [FMP-FIELD:MeetingDate]

Prepared by: [FMP-FIELD:By]

------

Attendees:

[FMP-CurrentToken:2]

[FMP-Field:Attendees]

SKAGGS

[FMP-Field:OtherAttendees]

Location: [FMP-Field:MeetingLocation]

------

[FMP-Portal:MMUID]

Topic: [FMP-Field:MMUID::Topic]

Discussion: [FMP-Field:MMUID::Discussion]

[/FMP-Portal]

The relationships work since I can see them in the filemaker database.

One thing that might be effecting it is that the CDML file is using an inline action to show the related files. Could this be causing the problem? TIA.

-Bradley

Is the portal working on HTML/CDML page?

  • Author

I am using an inline action on the format page so that when line items are added the format file can be the complete listing. Therefore there isn't any information on the CDML format page that is begin drawn from a portal.

So if you have a format page that contains a number of inline actions to render the page, is it possible to email this information? It doesn't seem so, since the form used for sending the mail is only able to search one database at a time. It seems to me though, that if the information is displayed in the correct layout in FM rather it be a related field or a portal that any of that information should be able to be drawn into the -mailformat text file. Am I missing something here?

  • Author

Update - I change the CDML format file to use a portal rather than an inline action and this doesn't seem to have any effect on the resulting email. All the record information shows up in the email, but none of the portal information.

Any thoughts, anyone?

It works for me OK without inlines.

If you put the portal on CDML/HTML page, does it works?

  • Author

No, it doesn't that is what I discribed in my update. Could it be a security thing? It doesn't work with Inlines or Portals. How should the -mailformat text file look? Maybe its a syntax thing there?

If portal doesn't work on HTML/CDML page, then it will not work in email.

Is your portal correctly displayed on your web layout and is the web layout specified in link generating the page?

  • Author

Yes and Yes. I can add to the portal from the web, search and have results from the portal displayed and your syntax was exactly like what I have. I don't get it ^_^-( Thanks for your help though.

Do the "Portal" tags need to be between "Record" tags!

Good Luck.

Garry

Garry's suggestion is good for multiple RECORDS each with own PORTAL.

How do you call the "mailformat" text file?

It should be:

<INPUT type="hidden" name="-mailformat" value="emailorder.txt">

  • Author

Thanks for the continued interest. Here is the CDML format file:

<form action="FMPro" method="get">

<input type="hidden" name="-DB" value="Minutes_NY_.fp5">

<input type="hidden" name="-Format" value="project_minutes_list.html">

<input type="hidden" name="-RecID" value="[FMP-CurrentRecID]">

<input type="hidden" name="-MailFrom" value="DO_NOT_REPLY@no_reply.com">

<input type="hidden" name="-MailSub" value="[FMP-CurrentToken:3] - [FMP-Field:MeetingDate] Meeting Minutes">

<input type="hidden" name="-MailHost" value="mail.intelspace.net">

<input type="hidden" name="-MailFormat" value="meeting_minutes.txt">

<INPUT TYPE="hidden" NAME="-token.1" VALUE="[FMP-CurrentToken:1]">

<INPUT TYPE="hidden" NAME="-token.2" VALUE="[FMP-CurrentToken:2]">

<INPUT TYPE="hidden" NAME="-token.3" VALUE="[FMP-CurrentToken:3]">

<INPUT TYPE="hidden" NAME="-token.5" VALUE="[FMP-CurrentToken:5]">

<INPUT TYPE="hidden" NAME="-token.6" VALUE="[FMP-CurrentToken:6]">

<INPUT TYPE="hidden" NAME="-token.7" VALUE="[FMP-CurrentToken:7]">

<INPUT TYPE="hidden" NAME="-token.8" VALUE="[FMP-CurrentToken:8]">

<INPUT TYPE="hidden" NAME="-token" VALUE="[FMP-CurrentToken]">

<table width="700" border="0" cellpadding="0" cellspacing="0">

<tr>

<td height="1" colspan="3" bgcolor="#CCCCCC"><spacer type=block height=1></td>

</tr>

<tr>

<td width="1" bgcolor="#CCCCCC"><spacer type=block width=1></td>

<td> <table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td class="Heading">Email these meeting minutes to:</td>

<td align="right" class="BodyCopy"> <input name="-Find" type="submit" id="-View" value="Email Creative Brief">

</td>

</tr>

<tr>

<td class="BodyCopyBold">

[FMP-CurrentToken:2]

</td>

<td class="BodyCopyBold">Others</td>

</tr>

<tr>

<td valign="top" class="BodyCopy">

[FMP-IF: Publish .eq. No]

Brief must be published to allow for client emailing capabilities.

[FMP-ELSE]

[FMP-InlineAction: -db=Contacts_NY_.fp5, -lay=Table, ClientNumber={CurrentToken:1}, -Find]

[FMP-Record]

<input type="checkbox" name="-Mailto" value="[FMP-Field:Email]">

[FMP-Field:FullNameC]

<br>

[/FMP-Record]

[/FMP-InlineAction]

[/FMP-IF]

</td>

First -- try POST instead of GET.

<form action="FMPro" method="get"> --> <form action="FMPro" method="post">

There is not closing </form>

Also, <input type="hidden" name="-RecID" value="[FMP-CurrentRecID]"> looks strange with Submit -Find.

I don't know if that is producing requested Find.

From CDML Ref db:

-RecID

What it does

Defines which record should be operated on. Used mainly by the -Edit, -Dup (duplicate), and -Delete actions.

Nothing about -Find

HTH

  • Author

I tried the POST vs. GET to no avail.

Also, there is a closing </form> tag and didn't include the rest of the HTML on purpose. I also tried removing the -RecID information and am now going to go with the exported PDF/AppleScript.

Thank you so much for you help.

Can we have a look at the contents of this file:

meeting_minutes.txt

or is it exactly as you displayed in the first post?

All the best.

Garry

I can't see a "-lay" tag!!!

You will need this to see any Related Fields. (According to my "CDML Reference" database.)

Garry

  • Author

You rock Garry!

Yes, it was the missing -Lay tag! The only problem was that the data was not being pulled from the right record into the email ( I was getting all records). I think it was due to the CDML format page being rendered by multiple inline actions. By adding the -RecID = [FMP-CurrentRecID] tag back in as a hidden field, the parent record was maintained.

Works great! Thanks to all who gave this issue some thought.

If you'd like to see the HTML, post and I'll add it. -Skuli

Didn't I wrote the

"and is the web layout specified in link generating the page?"

way up?

Oh well smile.gif

  • Author

Yes, you did! You rock too, Anatoli! Thank you both for your help.

smile.gif You made my day smile.gif

Create an account or sign in to comment

Important Information

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

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.