How to force zero to display if no sum() value

I have a few calculation fields that are sum(amount) through some dynamic self-relationships. I am trying to get zero to display if there are no records through the relationship. I tried:

If ( (Sum (table::amount)) =/= "" ; Sum (table::amount) ; 0 )

but it did not work. How would I create a field calculation to sum through a relationship and display zero if there are no records through the relationship?
ErootsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jvaldesCommented:
Try this

if (IsEmpty(sum(table::field)).0.sum(table::field))
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lesouefCommented:
yes funny, fm is able to force hidding 0's, but not the other way around.
I would suggest:
If(Sum(lines::qty) > 0 ; Sum(lines::qty) ; 0)
just because I don't like to test numeric fields for emptyness, but no difference expected.
0
ErootsAuthor Commented:
I was able to get this to work right off the bat. Did not even think about using the IsEmpty function. I took a look at lesouf's suggestion, but had previously tried that and was unable to get it to work. The problem being for summaries that have no values through the relationship, there is no numerical result, it just resolves as "", jvaldes's suggestion seems to be more geared towards the type of work / relationships I am using. THanks all!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FileMaker Pro

From novice to tech pro — start learning today.