Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Exponential, scientific notation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Exponential, scientific notation

    Well, time for me to ask a question. :-) I found a couple of somewhat related issues in threads but none that explicitly give me the answer to what I am encountering.

    I have a routine in which totals are created from filtered data. I have done these totals with tablesum(), dbsum(), and even by adding the values when iterating through pre-filtered/sorted data (have also added subtotals of data together which are fine until added). They many times result in scientific notation such as 2.46805e+006 which becomes 2468050. The actual number should have been 2468054.23. What is happening is that the significant digits are off and is rounded up. I cannot find a way to control this. What makes things worse is that it is inconsistent or at the least not dependent upon how large (# places) a number is as many times larger numbers will not be in scientific notation and will show the number correctly.

    Any ideas of a method that will yield totals without Alpha sporadically converting them into exponents? I am hoping that someone else has had this occur and figured out a way...but will try anything at this point.




    (not very credible to a client if I have to tell them I cannot get the exact totals for them!)
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________




    #2
    Re: Exponential, scientific notation

    Can you put the result of your calcs into vars and 'fix' the var, then put the result into a field? Just musing a bit... you didn't say where these numbers are used - a report? A numeric variable may not have the same interference so you may be able to cut off the result or whatever it is you want it to do.
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

    Comment


      #3
      Re: Exponential, scientific notation

      Hi Robin! :-)

      I did just that by iterating through the table data after sorting by the various groups. As you are thinking, I figured that it should fix it but watching the additions to the variable via debug, it would reach a point on some groups where it suddenly created the scientific notation....even though on other groups with a larger ending number it would not---this latter aspect is what really has me confused on how to remedy this issue.

      Thanks though for making sure I did that!

      I suppose I could just tell my client to just not make so much money! lol
      Mike
      __________________________________________
      It is only when we forget all our learning that we begin to know.
      It's not what you look at that matters, it's what you see.
      Henry David Thoreau
      __________________________________________



      Comment


        #4
        Re: Exponential, scientific notation

        Sorry...didn't see your other question about where/what I am dong this for.

        Simply just creating a CSV file that will show the data from the table utilizing various groupings which all will have subtotals and then a Grand total at the end...they will be opening it up with Excel. But the issue is in Alpha. The Grand Total is fine BTW (well,no scientific notation but the amount is incorrect)...and using the variable method and adding each subtotal together to create it worked to prevent the scientific notation...why it won't do the same for two subtotals is strange.

        The groupings are nothing elaborate:
        Code:
        Location
          Customer
            Job
        Mike
        __________________________________________
        It is only when we forget all our learning that we begin to know.
        It's not what you look at that matters, it's what you see.
        Henry David Thoreau
        __________________________________________



        Comment


          #5
          Re: Exponential, scientific notation

          In case someone wants to experiment....and to make certain it is not my build of Alpha or that my Alpha is not corrupted...here is a sample table with actual data with dummy names that should show what the issue is. The example is using tablesum...dbsum does exactly the same thing. To iterate through the table my code would have to be modified...if it comes to needing it, I will create new iteration code that applies.

          Appreciate any input.

          Put the following into the InterActive window:

          loc_txt="GP_TEST"
          cust_txt="Inner -"
          ?tablesum("test_sales_cust","word(name,1,":")="+s_quote(Cust_txt),"Amount")
          = 1.36488e+006
          ?tablesum("test_sales_cust","Location="+s_quote(Loc_txt),"Amount")
          = 2997239.54
          Attached Files
          Mike
          __________________________________________
          It is only when we forget all our learning that we begin to know.
          It's not what you look at that matters, it's what you see.
          Henry David Thoreau
          __________________________________________



          Comment


            #6
            Re: Exponential, scientific notation

            I have a convoluted work-around...summary operation grouping by Location and also by Customer...then a lookup to the summary table for the total. If the Location totals end up as exponentials for whatever reason in the future I will have to do the same thing for those...and for basically all the totals possibly.

            I am still hoping someone can figure out a more straight forward way to prevent this kludge.
            Mike
            __________________________________________
            It is only when we forget all our learning that we begin to know.
            It's not what you look at that matters, it's what you see.
            Henry David Thoreau
            __________________________________________



            Comment


              #7
              Re: Exponential, scientific notation

              Code:
              loc_txt="GP_TEST"
               cust_txt="Inner -"
               ? tablesum("test_sales_cust","word(name,1,\":\")="+s_quote(Cust_txt),"Amount")
              = 1364877.5600000015
              V11
              3381- 4096
              Win 7 Pro

              Code:
              loc_txt="GP_TEST"
               cust_txt="Inner -"
               ? tablesum("test_sales_cust","word(name,1,\":\")="+s_quote(Cust_txt),"Amount")
              = 1364877.56
              V12
              5221-5152
              Win 10 Pro
              Last edited by Stan Mathews; 08-06-2018, 08:40 AM.
              There can be only one.

              Comment


                #8
                Re: Exponential, scientific notation

                A5V11 3788-4187
                Code:
                loc_txt="GP_TEST"
                cust_txt="Inner -"
                
                ?tablesum("test_sales_cust","word(name,1,\":\")="+s_quote(Cust_txt),"Amount")
                = 1364877.5600000015
                
                ?tablesum("test_sales_cust","Location="+s_quote(Loc_txt),"Amount")
                = 2997239.5400000005
                A5V12 5221-5152
                Code:
                loc_txt="GP_TEST"
                cust_txt="Inner -"
                
                ?tablesum("test_sales_cust","word(name,1,\":\")="+s_quote(Cust_txt),"Amount")
                = 1364877.56
                
                ?tablesum("test_sales_cust","Location="+s_quote(Loc_txt),"Amount")
                = 2997239.54
                Alpha 5 Version 11
                AA Build 2999, Build 4269, Current Build
                DBF's and MySql
                Desktop, Web on the Desktop and WEB

                Ron Anusiewicz

                Comment


                  #9
                  Re: Exponential, scientific notation

                  Thanks Stan, Ron.

                  Looks like I either have a somewhat corrupted install or a version issue then. I appreciate your time helping to determine this.


                  Edit: I found I was not on the latest a5v11 build so it was an issue with the version I was using - now to remember why I was on an earlier version as it was intentional to eliminate an issue I had some time ago.....
                  Last edited by MikeC; 08-06-2018, 04:07 PM. Reason: Determined cause
                  Mike
                  __________________________________________
                  It is only when we forget all our learning that we begin to know.
                  It's not what you look at that matters, it's what you see.
                  Henry David Thoreau
                  __________________________________________



                  Comment

                  Working...
                  X