13 Replies Latest reply on Jan 11, 2012 11:47 AM by philmodjunk

# Trying to get "0" to appear in an email

### Title

Trying to get "0" to appear in an email

### Post

Just wondering how would I get the number "0" to appear in email...please see attached pic.

That is a summary field of cbalance due
It is checkmarked under number format to display 2digits.

-J

• ###### 1. Re: Trying to get "0" to appear in an email

The data format specified on a layout has no effect on the value displayed elsewhere such as the body of your email--as you have discovered.

You'll need to use a calcualtion that formats your data to include trailing zeros in the cents columns.

Let ( [ N = cbalance due ;
P = position ( N ; "." ; 1 ; 1 )
];
Int ( N ) &  If ( P ; Left ( Mod ( N ; 1 ) & "0" ; 3 ) ; ".00" )
)

• ###### 2. Re: Trying to get "0" to appear in an email

Hi Phil...so which field do I place this formula in...I am guessing the cbalance due. The cbalancedue has this formula already:

Round (cJobTotal - cPaymentPortion;2)

Thanks for  you help.  -J

• ###### 3. Re: Trying to get "0" to appear in an email

You could substitute Round (cJobTotal - cPaymentPortion;2) for cbalance due in the above expression provided you change the result type to text, but it can be used a calculation defined in the body box of your email--which is what I had in mind and is why the calculation refers to cbalance due. It does not need to be defined in any field.

• ###### 4. Re: Trying to get "0" to appear in an email

Phil...I was scared to death to input all that just to get a "0".....it worked like a champ.

Thanks again...-J

• ###### 5. Re: Trying to get "0" to appear in an email

I was just wondering, is their a way to get the portal list of all invoices paid into an email? See attached pic.

-J

• ###### 6. Re: Trying to get "0" to appear in an email

It's possible if plain text with tabs between each column is acceptable. Otherwise, you would eaier generate and attach a PDF or acquire an Email Plug in that supports more sophisticated formatting.

The plain text solution:

Define a calculation field, cPortalRow, in the portal table as:

Inv # & Char ( 9 ) & Qb # & Char ( 9 ) ..... & Char ( 9 ) & Amt. Due   (didn't type out entire list of fields here...)

Then, in your email body, use:

List ( PortalTableTable::cPortalRow )

• ###### 7. Re: Trying to get "0" to appear in an email

Hi Phil, I tried this and it only list the first row of information....Any idea how all the rows can be listed.

-J

• ###### 8. Re: Trying to get "0" to appear in an email

I got that figured out, I had the Calc field in wrong table.  It looks like I need a little formating.  For the numbers to line up using Char(9) it needs to be at least 5 digits...other wise it looks pretty good. see pic.

-J

• ###### 9. Re: Trying to get "0" to appear in an email

Here is the latest link...couldn't delete the other one.  -J

• ###### 10. Re: Trying to get "0" to appear in an email

Ok here is another image with the functions used.

• ###### 11. Re: Trying to get "0" to appear in an email

You are up against the limitations of Plain text emails. Note that the number of characters in teh values that appear too far to the left have fewer characters than those that doen't. Thus, the "tab stops" in your email browser align them one tab setting further to the left and this misaligns your data. And you can also see that your data is left justified instead of right justified.

An attached PDF, while less convenient for the recipient than including the data in the email body, will not have this limitation.

• ###### 12. Re: Trying to get "0" to appear in an email

Is there a Char() for the spaces a spacebar makes?

• ###### 13. Re: Trying to get "0" to appear in an email

If you look up Code in FileMaker help, you'll find the codes for any number of useful characters.

Space is returned by Char ( 32 ).

Of course you can also just put spaces between quotaion marks.