Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

How to enter text into a numeric field if value is zero

Avatar

Level 1

This is probably very simple, but I can't seem to find the answer. I am using LiveCycle Designer 7.0.

I have a numeric field that calculates the percentage of change between two other numeric fields. Because the divisor in the equation can be zero, I have placed the calculation within an "If,Then,Else" statement. However, I cannot get the text "n/m" to display on the form if the divisor (PYGasSales) is zero. Can someone please tell me what I am missing in this statement?

if(PYGasSales ne 0) then
(YGasSalesVar/PYGasSales) * 100
else
"n/m"
endif

Thanks so much!

1 Accepted Solution

Avatar

Correct answer by
Level 1

You can try to use text field instead of using numeric field.

Text field can show both text and numbers.

Numeric field can only show numbers.

Danash

View solution in original post

2 Replies

Avatar

Level 1


Thanks so much!


Will someone please kindly help me with this problem or direct me to an additional resource? Thank you!

Avatar

Correct answer by
Level 1

You can try to use text field instead of using numeric field.

Text field can show both text and numbers.

Numeric field can only show numbers.

Danash