Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Concatenating problem in a calculation


The Bobster

Recommended Posts

Hi all

 

I'm using a FMP calculation field (results set to = text) to produce an HTML page for each FMP record in my database, basically interweaving HTML code with the data held inside my various fields ... lots of concatenation of html and field names inside the calculation, as you'd imagine.

 

All works really great, except for one small annoying thing.

 

My problem is this ... while data held in any text fields displays fine in the calculation results, when I include a number field containing data in the format "10.50" inside the concatination formula, said data is displayed inside the calculation field results (and the subsequent html output) as "10.5".

 

This only seems to be a problem when the last digit is a zero. E.g. "10.99" displays as "10.99" in the calculation field results as I intend it to fine; but "4.10" displays as "4.1".

 

The number field appears to be correctly formated (e.g. I have gone format > number > format as decimal > fixed number of decimal digits = 2).

 

But the fourth character always vanishes if it is a zero inside my text-formated calculation results.

 

Any ideas on how to solve would be much appreciated.

 

The Bobster

Link to comment
Share on other sites

Hello Bobster,

If you enclose the number in your calculation within an expression along the lines of:

 

Int(Round(YourNumber, 2)) & "." & Right(Round(YourNumber + 1, 2) * 100, 2)

 

...you'll find that two decimal places will always be returned - even when the final digit is a zero. wink.gif

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use