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

Totals for an individual

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

    Totals for an individual

    Hi there,

    Im a complete novice at databases but have managed to put together an application that allows me to record information im told by my sales people. However, I am having difficulty putting together a calculation which totals up the figures for an individual user. All I have so far is a calculation which adds up all the values in the database. The calculation for that is as follows = total(activeprice ->price).

    From left to right the fields I have in my database are as follows. Contactid, Name, Date, Salesnotes, Price. I have had a look through the help section but it may as well be written in another language. Any ideas would be gratefully welcomed. Thanks.

    #2
    Originally posted by cello78
    Hi there,

    Im a complete novice at databases but have managed to put together an application that allows me to record information im told by my sales people. However, I am having difficulty putting together a calculation which totals up the figures for an individual user. All I have so far is a calculation which adds up all the values in the database. The calculation for that is as follows = total(activeprice ->price).

    From left to right the fields I have in my database are as follows. Contactid, Name, Date, Salesnotes, Price. I have had a look through the help section but it may as well be written in another language. Any ideas would be gratefully welcomed. Thanks.
    Where do you want to see the calculation's results? Form, report, browse?

    Total() is a report writer function which would give you results for individual sales people if you create a report grouping on sales person.
    There can be only one.

    Comment


      #3
      That's what I figured. I need to see the results in a field box at the bottom of the page so it would more than likely be a form or possibly a browse. I was lead to believe that tablesum() would be more appropriate.

      Comment


        #4
        Originally posted by cello78
        That's what I figured. I need to see the results in a field box at the bottom of the page so it would more than likely be a form or possibly a browse. I was lead to believe that tablesum() would be more appropriate.
        A browse doesn't have a "bottom of page" so I think a form is your best bet.

        I've attached a small sample of how it can be done on a form using tablesum().
        Last edited by Stan Mathews; 03-28-2006, 03:24 PM.
        There can be only one.

        Comment


          #5
          Thanks very much for the example. I shall have a look at it now.

          Comment


            #6
            Below is the formula you put in the test example. I have adjusted it to fit in with my criteria whereby activesterling is the name of the database, contactid refers to the users and profitloss is the column that needs totalling up. I keep getting a invalid or incomplete expression. Any ideas on what i've done wrong?


            total = tablesum("activesterling","Contactid="+quote(contactid),"Profitloss")

            Comment


              #7
              Originally posted by cello78
              Below is the formula you put in the test example. I have adjusted it to fit in with my criteria whereby activesterling is the name of the database, contactid refers to the users and profitloss is the column that needs totalling up. I keep getting a invalid or incomplete expression. Any ideas on what i've done wrong?


              total = tablesum("activesterling","Contactid="+quote(contactid),"Profitloss")
              That should be correct if "contactid" is a character field and "profitloss" is a numeric field.

              If "contactid" is numeric then

              total = tablesum("activesterling","Contactid="+contactid,"Profitloss")

              is the correct syntax.

              If these don't solve the problem, attach a small sample.
              There can be only one.

              Comment


                #8
                I see where i've gone wrong now Contactid is numeric. Your suggestion looks to have fixed the problem. Many thanks.

                Comment


                  #9
                  Originally posted by cello78
                  I see where i've gone wrong now Contactid is numeric. Your suggestion looks to have fixed the problem. Many thanks.
                  A generally accepted database procedure is to make a field numeric only if its contents will be used in a computation. Character strings lend themselves to much easier manipulation.

                  Not a rule, just a thought.
                  There can be only one.

                  Comment


                    #10
                    And one I won't forget in a hurry. Thank you very much for your help.

                    Comment


                      #11
                      I have one more question which you might be able to help on. I see that when I amend a price the calculation updates the table but not the field the total is displayed in. Is there a simple refresh I can apply or do I have to write up a function that will update everything accordingly?

                      Comment


                        #12
                        Originally posted by cello78
                        I have one more question which you might be able to help on. I see that when I amend a price the calculation updates the table but not the field the total is displayed in. Is there a simple refresh I can apply or do I have to write up a function that will update everything accordingly?
                        The calculated field should display the correct value when the new record is saved. Until then the price is not available to the tablesum() function. Test this by moving up or down record and then back.
                        There can be only one.

                        Comment


                          #13
                          I was interested to read this, because i have a similar problem with a database for some simple research.

                          I need to see a master table of products with the total number of marks each one receives in a database of survey responses. I want this to be a value stored in a browse because I need to export the table to excel so it can be typeset.

                          What would be a good function to use in situation like this?

                          Kind regards

                          David
                          Last edited by cellboy; 12-23-2005, 09:15 PM.

                          Comment


                            #14
                            Originally posted by cellboy
                            I was interested to read this, because i have a similar problem with a database for some simple research.

                            I need to see a master table of products with the total number of marks each one receives in a database of survey responses. I want this to be a value stored in a browse because I need to export the table to excel so it can be typeset.

                            What would be a good function to use in situation like this?

                            Kind regards

                            David
                            You'll have to provide us with some information which may be perfectly clear to you but...

                            I need to see a master table of products with the total number of marks each one receives in a database of survey responses. I want this to be a value stored in a browse because I need to export the table to excel so it can be typeset.

                            Well
                            I need to see
                            What does this mean? You want to display, store information about?

                            and
                            with the total number of marks
                            What is a mark?

                            I want this to be a value stored in a browse
                            Nothing is stored in a browse, a browse is a means of viewing a table's fields or computations involving those fields.

                            Please post again and explain what you mean.
                            There can be only one.

                            Comment


                              #15
                              Whoops! It was rather late by the time I posted this, that's my excuse. Let's try again:

                              I have an index of products, and a data base of survey responses where they have received ratings from respondents. They are joined on the product name in a one to many link.

                              I want to be able to add up all the scores an individual product has received, then sort the products by total score into a top twenty. Finally I need to be able to export this top twenty into an excel spreadsheet.

                              We are just moving across from Filemaker to Alpha because it's easier to work with, and are rebuilding some applications now run on the former. In Filemaker it was easy to deal with totals. In this example, a calc field would be added to the mastertable total that would add up the scores for the matching product in the child table. I'm afraid I've been struggling to grasp how to achieve something similar with Alpha. :o

                              Not got very far with help files, etc. Any pointers or reference material you can recommend would be greatly appreciated.

                              Kind regards

                              David

                              Comment

                              Working...
                              X