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.

preserve text format in calculation

Featured Replies

  • Newbies

I am new to FM (FMP 6, OSX) and I've spent a couple days searching for answers to my questions on this forum. Thanks to all those who have taken the time to answer posts, you've been very helpful!

I have a couple questions of my own...

Question 1: How do I preserve text formatting (such as superscripts/symbols) in a text calculation field that combines one or more text fields?

Question 2: If I have a text calculation field that combines a text field and a date field, how do I format the date part of the calculation to display 01/01/03 instead of 1/1/2003 (For example: ProdID = TextField1 & Month(Date1) & "/" & Day(Date1) & "/" & Year(Date1)?

Question 3: I want to create a number field that only displays numbers in scientific notation (ie. 1E+8 instead of 100000000), how would I do this given this is not a number field formatting option?

Thanks in advance!

Q1: Good question.

Q2: ... & Right(Year(Date1), 2)

Q3: Calc field = Left(Number, 1) & "." & Middle(Number, 2, 2) & "E+" & Length(Number) - 1

This is all off the top of my head, so it may not be totally accurate, but it's close.

"How do I preserve text formatting (such as superscripts/symbols) in a text calculation field that combines one or more text fields?"

You cannot, unless the text includes formatting codes like RTF or HTML.

Vaughan --

HTML in FMP? Is this new for v6? 'Cause it ain't there for v5, that's for sure.

That was my point... it can be done but FMP cannot "render" the formatting on-screen. It could be dicplayed in a browser or exported to Word however and display correctly, but not yet in FMP.

  • Author
  • Newbies

So I've found a weakness, eh? Thanks to both of you for your help! Much obliged!

Maclse wink.gif

You discovered, if not the most requested feature, one of the top two or three. Unfortunately, FM seems to have turned a deaf ear to this feature request.

Lee

mad.gif

  • Author
  • Newbies

I tried Dan's? (danjacoby) recomendation for changing the four digit date to two digit (Q2 above), and it worked. Does anyone know how I can make the Month and Day to show 01/01/03 instead of 1/1/03 (add leading zero...without incorporating an If statement) when combining a text and date field in a caculation?

Thanks again!

Hi maclse,

This seems to work.

TextField1 &

Right("0" & Month( Date), 2)

& "/" & Day(Date) & "/" & Right(Year(Date), 2)

HTH

Lee

smile.gif

  • Author
  • Newbies

Thanks Lee,

It worked like a charm.

Text1 & "_" & Right("0" & Month(Date1), 2)

& "/" & Right("0" & Day(Date1), 2) & "/" & Right(Year(Date1), 2)

How did you figure it out? Trial and error?

Thanks again. laugh.gif

Hi maclse,

Glad it worked.

Secret

wink.gif

Actually it's an adaptation of a calculation I used for a time calculation supplied by Ross Dickenson.

Lee

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