Jump to content

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

Recommended Posts

  • Newbies
Posted

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!

Posted

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.

Posted

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

Posted

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.

Posted

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

  • Newbies
Posted

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!

Posted

Hi maclse,

This seems to work.

TextField1 &

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

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

HTH

Lee

smile.gif

  • Newbies
Posted

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

Posted

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

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