Sign is a nice example of a compact, efficient function that can really cut down the length of certain calculations. Its utility is simply this: check a number and report whether it’s negative, zero, or positive.
Sign accepts just one parameter which must either be a number or an expression that resolves to a number. If that parameter is a negative value of any amount, Sign returns -1. Similarly, if the parameter is any positive number, Sign returns a (positive) 1. Zero begets zero. Fundamentally it’s like asking FileMaker “where does this value fall on the number line?”
If you’re thinking “that’s a pretty easy Case function to write” you’d be correct. But using Sign will benefit the efficiency, compactness, and readability of your code. In the comparison below, using Case requires nearly four times the characters and, when formatted for readability, five lines instead of one.
How about a real-world example? We can use Sign in combination with our friend the Choose function to generate a message to appear on an invoice or statement. This calc will show an appropriate message whether the customer owes you money, you owe the customer, or the two parties are even.