Professional Web Applications Themes

Decimal in forms - Adobe Acrobat Windows

Claudio: Your idea: Just an afterthough, as JavaScript and not Adobe seems to be the culprit. Have you tried an intermediate invisible field to perform your calculations with the American (period) separator, and a final one for displaying the result with the rest-of -the-world separator (comma)? WORKED!! As long as the answer to the division has a dot instead of a comma, it works. All other fields can be formatted as usual. Thank you so much! Lena...

Sponsored Links
  1. #21

    Default Re: Decimal in forms

    Claudio:

    Your idea:
    Just an afterthough, as JavaScript and not Adobe seems to be the culprit. Have you tried an intermediate invisible field to perform your calculations with the American (period) separator, and a final one for displaying the result with the rest-of -the-world separator (comma)?

    WORKED!!

    As long as the answer to the division has a dot instead of a comma, it works. All other fields can be formatted as usual.
    Thank you so much!

    Lena
    Sponsored Links
    Lena_Hanson@adobeforums.com Guest

  2. #22

    Default Re: Decimal in forms

    Lena,

    Well, I am glad that logic worked where my ignorance in JS didn't.

    Enjoy your next long rest period. Stay completely away from computers then.

    Claudio.
    Claudio_González@adobeforums.com Guest

  3. #23

    Default Re: Decimal in forms

    Claudio,

    Maybe my happy note above was a little premature... It works but the result is not right. It's not even close. For instance if we divide 5000 with 0,5 the result should be 10000. One time it can be 7245 and another time -235. Hm. We have to continue to work at this.

    I will never be able to stay away from computers :) But I will be able to not WORK. But it's a month till then.

    Lena
    Lena_Hanson@adobeforums.com Guest

  4. #24

    Default Re: Decimal in forms

    Lena,

    As I said, I know no JS, but maybe logic can help again. Are you saying that the result in the intermediate (period) field is random? Or is that result right, but converts randomly when passed on to a comma separator field? Logic says these are two different problems; and would like to know which one you are experiencing.

    Yes, I remember you said you have one full month to go before your four weeks, but I am sure time will start moving faster with each passing day. And I suspected you were goint to say you cannot get away from computers. Well, about six months ago I was taken for a very long weekend (much more like a full week) out of civilization. It was at least three days without any signal in any cellular phone, and nowhere to connect my laptop. And you may not believe it, but not only the world didn't collapse, but I actually enjoyed it! (only took my laptop out the first day; it was relegated to a closet the rest of our stay out). Why, there were actually some people who didn't even note my absence! A somewhat ego-flattening experience, but very nice.
    Claudio_González@adobeforums.com Guest

  5. #25

    Default Re: Decimal in forms

    It is very frustrating for me.
    FieldA-FieldB is okay.
    FieldA-FieldB-FieldC is not. It gives me the result of FieldA-FieldB.
    Essy@adobeforums.com Guest

  6. #26

    Default Re: Decimal in forms

    Claudio

    My colleague has taken over this problem, but if I am not all wrong, the result is right when in the "period" field, but it gets random when divided with another field. I will look into this more tomorrow.

    Lena
    Lena_Hanson@adobeforums.com Guest

  7. #27

    Default Re: Decimal in forms

    Lena,

    My suggestion was to perform all troblesome calculations in an intermediate field using the period as decimal separator, and then just take the result to a "normal" field, if possible without the use of JavaScript. From what I have gathered in previous posts in this thread, results are bound to be wrong if you use JS again in the "final" field.

    If the calculation is coming out right in the intermediate field, and the final field is properly formatted, I would expect no problem in thwe conversion.

    Please let me know if this works.
    Claudio_González@adobeforums.com Guest

  8. #28

    Default Re: Decimal in forms

    Lena,

    In my Acrobat 5 file, I have just defined a field NX, formated as 1234.56, and a second field NXX, with format 1.234,56 and equal to the sum of NX plus nothing. When NX is empty, NXX shows as 0,00. If I introduce 3.25 in NX, NXX automatically gives 3,25. So it seems my logic is right.

    Claudio.
    Claudio_González@adobeforums.com Guest

  9. #29

    Default Re: Decimal in forms

    I don't know about JS either. But if Adobe's built in functions work as Lena seemed to suggest, why the need to use JS? I am sure there is a very good reason for that but I am curious to know what that is.
    Essy@adobeforums.com Guest

  10. #30

    Default Re: Decimal in forms

    Essy, as Lena said, Acrobat can do multiplications, but not divisions. She needs divisions, and these seem to require scripting.
    Claudio_González@adobeforums.com Guest

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Question decimal Places
    By Unregistered in forum Brainstorming Area
    Replies: 0
    Last Post: September 13th, 07:26 AM
  2. hexadecimal to decimal
    By Mat in forum Macromedia Director Lingo
    Replies: 2
    Last Post: March 3rd, 08:48 AM
  3. Converting from decimal to hex
    By Anders Bystrup in forum PERL Miscellaneous
    Replies: 2
    Last Post: July 30th, 03:14 PM
  4. do not cut decimal places
    By Marek Lange in forum Oracle Server
    Replies: 2
    Last Post: July 2nd, 10:03 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139