Skip 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.

Using a quote in a calculation

Featured Replies

Hello,

I am using FMP to generate an HTML page using data from fields to fill in paramters and image names. Although most browsers are forgiving and do not requite the quotes areound parameters I do like to follow the HTML spec by using them. FMP will not allow nested quotation marks, so my question is: how do I get a calculation to output concatented text and field data with quotes in it (example: <td height="25" align="center" valign="top">).

Thank you,

Robert

TMR Design

FileMaker Version: 6

Platform: Mac OS X Panther

To output quote marks in a FileMaker text calculation you need to add a few extras, since quote marks around text are used to signify that it is text, but are not output as such:

"<td width=""20"">"

It's a black art to get the right number everywhere the first try, but FileMaker will generally tell you if you don't, and you can see the result. Alternatively you can create a global field and put a quote mark in it, or a calculation file on its own. If it's named "q" then:

"<td width=" & q & "20" & q & ">"

is equivalent; but not really any easier in this case.

  • Author

Thanks for the reply. Now here is another related question

In the process of assembling fields and text to build the HTML code to output I find that I can't concatenate using calculation fields. How do I get around that?

Example: There is a calculation field named 'image_name'. That field takes a Compact Disc namefrom field 'cd_name' and adds either .jpg or.gif depending on a radio button selection in 'image_format', thus returning something like 'favorite_cd.gif' in 'image_name'.

Now if I want to build that into a string of code but can't. I have a field named 'html_output' and it is supposed to be made up of a string of code pre-entered joined with 'image_name' like this:

<td width="20" align="center"><img src=" & image_name & "></td>

but this does not work because image_name is a calculation.

How do I get around this?

Thank you,

Robert

Use this formula:

"<td width=""20"" align=""center""><img src=""" & image_name & """></td>"

or store a double quote character in a global field called gQ and then use this formula:

"<td width="&gQ&"20"&gQ&" align="&gQ&"center"&gQ&"><img src="&gQ& & image_name & &gQ&"></td>"

Or a third option. Store the text that is to the left of image_name in a global gLeftPart, and the text that is to the right of image_name in a global called gRightPart, and then use this formula:

gLeftPart & image_name & gRightPart

where gLeftPart contains:

<td width="20" align="center"><img src="

and gRightPart contains:

"></td>

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.