# Formula Help

• 0
• Question
• Updated 1 year ago
I am trying to write a formula for a new field.

If [ships in 7 days] a formula field is "yes", then display the number in [pallets outbound]
if not, display 0.

here's what I have -- not sure why I am getting an error.

If([Ships within 7 days?] = "yes", [Pallets Outbound],"0")
• 736 Points

Posted 1 year ago

• 0
• 70,384 Points
In suspect that this is a formula numeric field and you are trying to populate text into it.

Try this as I removed the quotes

If([Ships within 7 days?] = "yes", [Pallets Outbound],0)
• 4,430 Points
The 0 should not be within quotes. Also what data type is [Ships within 7 days] ? If it's a check box then the value would be true. if([Ships within 7 days]=true, [pallets outbound],0)

Ⲇanom the ultimate (Dan Diebolt), Champion

• 30,204 Points

If([Ships within 7 days?] = "yes", ToString([Pallets Outbound]), "0")
• 4,430 Points

Ⲇanom the ultimate (Dan Diebolt), Champion

• 30,204 Points
OP>I am trying to write a formula for a new field.

In the event the OP wanted a text result.
• 70,204 Points
ToString is actually not a published Quick Base function.

It seems to revert to ToText though upon saving.
• 4,430 Points
Then you have to do some more jazzy stuff when the OP wants to perform math on your text result.

Ⲇanom the ultimate (Dan Diebolt), Champion

• 30,204 Points
Oops - my bad. I had my Service Worker turned on that converted ToString() to ToText().

Ⲇanom the ultimate (Dan Diebolt), Champion

• 30,204 Points
It is Magic: ToString() => ToText()