cancel
Showing results for 
Search instead for 
Did you mean: 

Clear field when amount is 0

Former Member
0 Kudos

Hey,

I have an input field from the type decimal. When the value, which is coming from the interface,

is 0, it shows the 0 in the field. Is it possible to supress the output of the field, when it is 0?

Can you please show me how to do that? I have just done a few changes in Adobe interactive forms,

so please describe in a way for newbies.

Thank you!

Reward points guaranteed

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Michael,

I am assuming the Hierarchy like this:

BodyPage

--> Subform

--> Decimal field

You can write following code in the "form:ready" event of the bodypage:

if ( $.Subform.Decimalfield == 0 ) then

$.Subform.Decimalfield = ""

endif

Hope this helps,

Amit

Former Member
0 Kudos

Thank you very much!

I have never done something with events inside of interactive forms. Where do I find them?

Michael

Former Member
0 Kudos

Goto Palettes --> Script Editor

Then select the BodyPage, and in the Show dropdown of Script Editor select the formready event.

with regards,

Amit

Former Member
0 Kudos

Hmmm,

I have done it in the way you showed me, but it´s still shown with "0,00"....

Can I debug the script? From my point of view, it normally should work now...

Former Member
0 Kudos

Can you tell me the hierarchy of the Form.

You can debug the form using messages in the script. Like

$host.messagebox("In the event")

Former Member
0 Kudos

Hi,

I have my "page1" and under that a table node.

Then the table body and then the field called PRICE.

Like this:

page1->table->tablebody->PRICE

And I have done this:

On the table node at form ready:

if ($.tablebody.PRICE == 0) then

$.tablebody.PRICE = ""

endif

On the tablebody node at form ready:

if ($.PRICE == 0) then

$.PRICE = ""

endif

But both didn´t do something...

Do you know what´s wrong?

Thank you!

Former Member
0 Kudos

Sorry,

Code shoyuld be:

if ($.tablebody.PRICE == 0) then

$.tablebody.PRICE.rawValue = ""

endif

and check the condition is getting satisfied or not by putting messagebox in it.

if ($.tablebody.PRICE == 0) then

$host.messagebox("In the if")

$.tablebody.PRICE.rawValue = ""

endif

if it is not coming in if then compare it with 0.00.

Hope this helps