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

Copying Calculated Field to a Numeric Field

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

  • Copying Calculated Field to a Numeric Field

    I have a form which is based on the Alphasports invoicing form in which I enter items a Client has ordered and it calculates a grand total including Carriage & VAT. I wanted to use the total for each Customers invoice in a report so I setup an event to copy the value in the Calculated field to a numeric field (called ORDER_TOTAL). This numeric field is on the form but normally hidden.

    While I was making some changes to this form the other day I made the above field visible and while I was looking throught the invoices I noticed that the value stored in the ORDER_TOTAL field was different to the value in the calculated field!?

    The Calculated field displays 511.59 but the value copied into the ORDER_TOTAL field is displayed as 511.60. I suspected this could be a rounding error but this error only occurs on this one invoice and both of the fields are formatted with the same currency format e.g $123,456.78 width 10 decimal places 2.

    It only occurs on one of the invoices, but I cannot understand how this can be happening - can anyone explain this or has anyone else had this problem and found a way around it?

    Thanks,

    Alastair

  • #2
    RE: Copying Calculated Field to a Numeric Field

    Hi Alastair,
    I suspect rounding, as well. There may be an area where you can specify rounding - but I want to steer you in a different direction.

    Instead of copying the total fields, you can post them. I'm curious if that will bring the same results.

    Also, a much better idea is to create a report they way you want your invoices to look, and include the calculated field on the report.

    I hope this helps.

    Wanda

    Comment


    • #3
      RE: Copying Calculated Field to a Numeric Field

      How are you doing the copy?

      i.e. are you copying the "value" of the field object on your form that is displaying the computed result, or are you copying the computed result, itself ?

      -- tom

      Comment


      • #4
        RE: Copying Calculated Field to a Numeric Field

        Tom,

        Thanks for your reply, sorry I have not got back to you sooner but I have been on holiday for a few days!

        I am copying the values using the onfetch event of the form. Don't know if this is the best way to do this, but it seems to work.

        The value is set by a conditional action Order_total""grand_total and the field Order_total is set to the value of CALC-"grand_total.

        Alastair

        Comment


        • #5
          RE: Copying Calculated Field to a Numeric Field

          Hi Wanda,

          Thanks for your reply, sorry I haven't replied to you earlier but I have been on holiday for a few days.

          I haven't used posting before I will have to see how to do this - is it easy to set-up?

          Thanks,

          Alastair

          Comment


          • #6
            RE: Copying Calculated Field to a Numeric Field

            Hi Wanda,

            Forgot to ask in my previous post to you - what does the little envelope next to your post indicate?

            Alastair

            Comment


            • #7
              RE: Copying Calculated Field to a Numeric Field

              Hi Alastair,

              Posting can be set up in field rules, or as an operation. The one in the field rules will post the result as the master table record changes, or is entered. Be careful to first select the table you want to post information TO, in the first column. You'll get to indicate the SOURCE, a few columns over from the first table. The SOURCE table is where the data is posted FROM.

              Posting via an operation is posted at will - whenever you want to run the operation.

              The envelope? What envelope?

              Wanda

              Comment


              • #8
                RE: Copying Calculated Field to a Numeric Field

                Alastair,

                If your calc field is defined in the form (and is not a field in your table) this might explain what you're seeing.

                The numeric field in your table has a fixed structure, and a defined number of decimals. If you assign a value to this field that contains additional decimals it will automatically round, because of the structure limitations.

                In contrast, a numeric form level calc field does not have a predefined limit on the number of decimals.

                If this is your situation, I suggest you change the numeric form level calc field definition to return the numeric value rounded to two decimals.

                -- tom

                Comment


                • #9
                  RE: Copying Calculated Field to a Numeric Field

                  Tom,

                  I believe from examining both the calculated field and the numeric field that they both have the same formatting options e.g. currency width 10 and decimal places 2 - is this what you mean?

                  Alastair,

                  If your calc field is defined in the form (and is not a field in your table) this might explain what you're seeing.

                  -- tom

                  Comment


                  • #10
                    RE: Copying Calculated Field to a Numeric Field

                    Wanda,

                    I will have a look at this this may be a neater way to accomplish this!

                    The envelope symbol I am talking about is shown in the list of posts at the top of this page. Not sure what it indicates but it only seems to be occuring next to your posts?

                    Alastair

                    Comment


                    • #11
                      RE: Copying Calculated Field to a Numeric Field

                      Nope.

                      -- t

                      Comment


                      • #12
                        RE: Copying Calculated Field to a Numeric Field

                        I was recommending that you incorporate the Round() function in the definition of your form level numeric calculated field. I said nothing about changing the display formatting options for either field. Sorry I wasn't clearer.

                        -- tom

                        Comment


                        • #13
                          RE: Copying Calculated Field to a Numeric Field

                          Tom,

                          I have read your previous post again and I think I now understand what you are saying. Is there any way to overcome this?

                          Alastair

                          Comment


                          • #14
                            RE: Copying Calculated Field to a Numeric Field

                            Tom,

                            Yes, this is what the problem was. The rounding error was occuring in the VAT calculated field. With the use of the Round() function as you suggested this has solved my problem.

                            Thanks ever so much for your help. After all the time I've spent looking at this minor problem. It is very satisfying to solve it at last!!!

                            Alastair

                            Comment


                            • #15
                              RE: Copying Calculated Field to a Numeric Field

                              Great! I'm glad you have it sorted.

                              -- tom

                              Comment

                              Working...
                              X