Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Negative Number

Avatar

Level 2

I have created a form and have numeric fields. I can fill in this form, in these fields, with a negative number. Once I save the document, close it, and open it back up the negative number has been replaced with a 0. I have tried changing the Data format from float to integer and also to decimal and still the form doesn't save the negative number. My Default binding is "normal".  Any help would be appreciated.

Thanks.

cardgunner

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Yes that is exactly how it works. There might have been something wrong with your data pattern I did not look that closely .....I merely removed it and the

display format was working when it opened again.

I defined it as a float and it worked.

Paul

View solution in original post

15 Replies

Avatar

Level 10

May be you are using a display Pattern which is converting the negative number to 0.

Thanks

Srini

Avatar

Level 2

my display patteren is $ZZ,ZZZ,ZZ9.99.

Avatar

Former Community Member

Is the field calculated or are you placing a value in there? Are other fields showing the proper data in them?

paul

Avatar

Level 2

It is a User Entered-Optional value type.

When the binding data format is set to integer I do get the value to stay however when I open the document i get the error stating "Invalis value:'$-      200.00' for integer' property

Avatar

Former Community Member

I just created a form here and cannot duplicate the issue....can you send me your form and I will have a look.

Send it to LiveCycle8@gmail.com

Paul

Avatar

Level 2

Thanks Paul. I sent it along to you.

What Binding Data Format would normally be used for a numeric field that will hold both positive and negative numbers?

Avatar

Former Community Member

The binding has nothing to do with the content of the field ....it simply defines whether you want to store the field in the data dom (which is what is used to submit) and what node in the data dom to write the data into.

Hope that helps

Paul

Avatar

Level 2

Isn't this very similiar to a form on a db? The information can be entered and shown on the form in a certain way however you would like it stored in the forms underling table a different way.

Such as phone numbers. I may want it displayed as (123) 456-7891 however it should be stored in the document as 1234567891. Then when they submit it i get it as 1234567891. But when I open it in it's form it comes back as (123) 456-7891

That being said should currency be stored as a float or an integer?

Avatar

Correct answer by
Former Community Member

Yes that is exactly how it works. There might have been something wrong with your data pattern I did not look that closely .....I merely removed it and the

display format was working when it opened again.

I defined it as a float and it worked.

Paul

Avatar

Former Community Member

Also because you are using a currency you may want to use the decimal field ...you might find that easier.

Paul

Avatar

Level 2

Paul,

You are a correct! Why I was wanting the store the info in that pattern is beyond me, but I took the pattern off and WHAM it works.

Thank you. I fell kinda stupid for having not tried that hours and hours ago.

Thanks again.

Avatar

Level 2

"Also because you are using a currency you may want to use the decimal field ...you might find that easier"

...really? This is my first form. Are you saying create 2 fields in the form one to capture the whole figure and the other to capure the change? or is there a field like a numeric or text called decimal?

Avatar

Former Community Member

No No ...the decimal field will hold the whole currency amount it is really a floating field with a specific pattern  applied but it allows you to click on check boxes and makes it easier for you the Designer to build the pattern without having to know about patterns.

paul

Avatar

Level 10

There is a Type of field called Decimal Field in LiveCycle. Just like Numberic Field /Text Field. You can add a Decimal Field to the form (OR) selecte the current field and in the properties change the type to Decimal Field.

Decimal Field.jpg

Thanks

Srini

Avatar

Level 2

I have an older copy of designer. I have Designer7. I looked and there is not a Decimal Field.

I now am trying to figure out sales tax and percentage. I'll start a new thread to keep on topic.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----