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

Problem with calculated fields

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

    Problem with calculated fields

    I am very new to Alpha 5 version 9 platinum.

    I am trying to setup a very simple invoice entry type database. I just need to enter the invoice number, date, first and last name, type work, and amount paid. I need to collect sales tax or not.

    The amount paid is the problem because of the sales tax issue. I want to have one field where I enter either "y" for yes or "n" for no to answer the question, "is this taxable". If the answer is "y" then I need to fill in another field (i.e., TAX_PAID) with the correct amount of tax.

    Here is the process I need to have the database do:

    After the general stuff, I will have a field that is TOTAL_INV_AMT which is used to calculate tax.

    The next field will be the question: taxable or not where user enters y or n. Then if Y then the TAX_PAID field is filled in with the calculated amount of 7% multplied by the TOT_INV_AMT. If the anwer is N then value 0 is entered into TAX_PAID field.

    The next field is user entered AMT_PAID. There are many times where we collect less than the total. Here is an example: if the total invoice is $1000 and is taxable, the TOTAL_INV_AMT field would have 1000.00 entered and the next field would be $70.00 (7% times 1000). Then in the AMT_PAID field the entry might be 600.00 which is the actual amount collected. Then there is another field named INCOME which is a calculated amount of AMT_PAID minus the calculated amount in the TAX_PAID field.

    Sorry for the rambling, I am just trying to be clear.

    So here is what I need to know:
    how do I write the formula to calculate sales tax or not based on the "y" or "n" in the SALE_TAX field and then place that value into the TAX_PAID field?

    Then how do I write the formula that subtracts the TAX_PAID from the AMT_PAID with the results placed in the INCOME field?

    I actually had this setup and working for several years using Alpha 4 but now I cannot remember how it is done and I cannot find the answer in the help files.

    Hopefully someone can help me with this.

    Thanks,
    Chuck

    #2
    Re: Problem with calculated fields

    Hi Chuck

    I would suggest that you use the fieldrules for these calculations.

    how do I write the formula to calculate sales tax or not based on the "y" or "n" in the SALE_TAX field and then place that value into the TAX_PAID field?
    First: The user must choose "y" or "n" for the salestax.
    Go to the fieldrule of SALE_TAX and at the tab Data entry set Required on "Always required"
    At the tab "Loopkups" you create a "Simple list" als Lookup style. Enter "y" in the first and "n" in the second column. (without "")

    Second:
    Go to the fieldrule of TAX_PAID and choose at the tab "Field types" for "Calculated".
    Make the Calculated field expression as: If (SALE_TAX ="y" ,TOT_INV_AMT*.07,0)


    Then how do I write the formula that subtracts the TAX_PAID from the AMT_PAID with the results placed in the INCOME field?
    Third:
    Make also a calculated field of the field INCOME
    The expression is AMT_PAID-TAX_PAID


    However this are my answers on your questions, I would prefer to use some other fieldnames.
    Work_amt, tax_amt, and TOTAL_INV_AMT for the amount inclusive tax.
    In your case you then just type in the amount of the work and y/n for tax.
    with a fieldrule for the TOTAL_INV_AMT (Work_amt+Tax_amt) you've setup the calculated part of this.

    Do a search with "fieldrules" on this messageboard and you will find a lot a similair questions and a lot of great solutions with fieldrules.
    Also the help is a very usefull documentation.

    Welcome in the Alpha Five Community.

    Ton
    Most things are simple but unfortunately only after the first time

    Comment


      #3
      Re: Problem with calculated fields

      Hi Ton Spies,

      Thank you so much! They worked!

      My math abilities is so poor that when I see parenthesis or other math type operations my head gets fuzzy.

      BUT I HAVE ANOTHER PROBLEM THAT I CANNOT FIGURE OUT. I HOPE THAT YOU OR SOMEONE CAN HELP WITH.

      In the field Total Invoice where the user enters the total amount of the invoice to be used to calculate sales tax, after the number is entered and the user tabs to the next field, the number in TOTAL INVOICE field is changed to 6 small squares??? I have tried everything I can think of and it still does it.

      Do you have any ideas?

      Thanks,
      Chuck

      Comment


        #4
        Re: Problem with calculated fields

        Chuck,
        The small squares are indicative of a field being too small to handle the number of characters/digits that are being entered. Go into the form properties and make sure the format of the field is adequate....may also be the same problem in how you first created the field length in the table structure so is another place to check.
        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: Problem with calculated fields

          Originally posted by MikeC View Post
          Chuck,
          The small squares are indicative of a field being too small to handle the number of characters/digits that are being entered. Go into the form properties and make sure the format of the field is adequate....may also be the same problem in how you first created the field length in the table structure so is another place to check.
          Mike,

          Thanks for your help. It was my first thought so I kept changing the table structure but that DID NOT show up as a change. Since I am new to Alpha 5, I accidentally found the "form properties" while I was viewing the form in the design mode I right clicked and there it was. Alpha 4 was not as powerful but I think was more intuitive. I seem to find things much easier.

          Thanks for your help,
          Chuck
          Last edited by CChilders; 05-24-2009, 01:01 PM.

          Comment


            #6
            Re: Problem with calculated fields

            Chuck,
            Alpha 4 was not as powerful but I think was more intuitive. I seem to find things much easier.
            Although I have never used Alpha 4, I imagine the difficulty you are finding is not necessarily due to lack of intuitiveness, but that of complexity. There is so much more to Alpha now than before that makes it overwhelming I am sure. Even learning Alpha 5 v.5 would be much easier than coming to Alpha v.9 directly...and then v.9 would not seem as big a hurdle. I think you and many others try to understand everything right away and that would not be easy for anyone. Or many times try to tackle a more complex task before mastering the basics behind it.

            Just know that most answers are here on the messageboard and what is not generally will be answered by many members here who love a challenge!
            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