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.

Email script - formatting of data and bug??

Featured Replies

Hi,

I have a database tracking development contracts. I have set up some automated emails.

Problem: Due to the calculation of deposits etc and the way in which I have to export data (long story) all numbers must be entered without any formatting save the decimal point. i.e $20,000.00 is entered 20000.00 (but subsequently formatted to display as $20,000.00 for ease of reading onscreen). Also, any calculation of fields i.e field1 + field2 result is automatically 20000.00 whilst DISPLAYED as $20,000.00.

My email has the following message:


"Hi Belinda

Hi,

I work on FileMaker Pro 5.5. I found your formatting question interesting and tried writing a script because I wanted it to be generic. It took a long time for me and I hope it could be helpful. I don't know if there is a direct function and I don't have a solution to your second problem. I discovered what you are saying is true that the signature does not get inserted using send mail. To use a script I have used two global values:

gCounter

and

gMessage

See my script below. I have given my coments within /*..*/B)

Allow user abort[on] /*to make sure the loop works fine*/

Set error capture[on]

set field[gmessage,""]

if[length[numtotext[deposits]]<4] /* If it is not more than three digits then we do not need any formatting */

set field[gmessage, deposits]

else

set field[gCounter,3]

set field[gmessage, right[numtotext[deposits,3]]

loop

if mod[gCounter,3]>0

set field[gMessage,"Middle[NumToText{deposits], length[NumToText{deposits]- gCounter,1] & "," & gMessage] /*To keep a comma after every third digit starting from right */

else

set field[gMessage,"Middle[NumToText{deposits], length[NumToText{deposits]- gCounter,1] & gMessage]

end if

set field[gCounter, gCounter + 1] /* To increment the global counter*/

exit loop if[length[numtotext[deposits]] <= gCounter]

end loop

endif

set field [gmessage, "Hi Belinda

  • Author

Thanks for your help Sanjai. I'll have a play with it and see how I get on.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.