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

i know its easy but.....

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

    i know its easy but.....

    i got two fields (exam1 and exam2) and the result field!
    the expression for the result field is (exam1+exam2)/2
    and how can i configure the result field so that it shows (exam1+exam2)/2 if the exam2 field is not empty!? i tryed:if with 0 !But this was wrong because the exam2 can be 0 when the student is very lazy! also if is empty(not null)! sorry for my english:(

    #2
    RE: i know its easy but.....

    not sure, but try:

    ""

    Comment


      #3
      RE: i know its easy but.....

      Biber,

      Assuming that your talking about an expression for a calculated field that is numeric, try:

      If(field2=0,0,(field1+field2)/2)

      you could then set the field format in properties to show blank if zero.

      Hope this helps.

      Scott

      Comment


        #4
        RE: i know its easy but.....

        if exam2 is empty, the result is (exam1+0)/2. There is nothing wrong with that. But you might have to set exam2 to 0, if it is empty. Isblank might handle that nicely, or a small "if" or "case" statement.

        efs

        Comment


          #5
          RE: i know its easy but.....

          my app. is a great grade database for a highschool! and there are some lessons with only one exam and some lessons with two exams! my result field should show the result of the exams! so this field should calculate the avarage of the both exams if the lesson has two exams! and if the lesson has only one exam it should show the result of the exam. but cant use 0 for the second column if the less. has only one exam because the field would calculate this!! so have to leave this column empty!

          Comment


            #6
            RE: i know its easy but.....

            I think the isblank() function will help. It's supposed to work with any field type.

            I haven't tried this but I'd start with something like:

            IF( isblank(exam2),exam1,(exam1+exam2)/2 )

            WARNING: Leaving a numeric field blank can cause big problems. (In more ways than one - read on.) You might want to consider making the default 999 or some other ridiculous number. If you read the value of an object on a form that happens to be a blank numeric value (something like parentform:exam1.value) the result will be something like 10^98765 power. Yes, that's a HUGE number! If you want to leave the value blank, the next best bet is to NEVER get a numeric VALUE from a form object. Instead use something like parentform:exam1.text to test for a blank value first; then user val(parentform:exam1.text) to get the actual value if it isn't blank.

            Comment


              #7
              RE: i know its easy but.....

              I used something similar in my own school grade program.I had a set which combined student data (student number) with tests and test transactions. I used the isblank function to count the number of tests taken I totaled the number of tests and totaled the scores and then divided.
              I have attached a very crippled version of how it works. I'm sure the experts on this board can have hours of fun pointing out the poor design but it did work for me.
              Regards
              Jim

              Comment


                #8
                RE: i know its easy but.....

                Sorry I fogot the attachment

                Comment


                  #9
                  RE: i know its easy but.....

                  Biber,

                  This problem, actually, begs for different approach than you have taken.

                  If you have two exams, and a student gets a zero then you have to average the grades. However, if there is only one exam then you just take the first score.

                  Given the above you have to put in a mechanism that tells the program which case it is dealing with. (Your idea of a blank field vs. a zero would work in most cases, but it assumes the user understands the difference between Blank and zero, and thus invites data entry errors.)

                  I would approach the problem by adding a logical field to the table which tests for the "second exam" case and define a field rule which defaults to the most common case (either .t. or .f. for the second exam.)

                  set up data entry so that the user enters the exam1 then answers .t. or .f. for the second exam. If the user answers .t. then go get the second score. (set up a field rule to skip the second exam field if the response is .f.)

                  for this example, let's call the logical field "L2exams"

                  Then your formula would be something like:

                  if(L2exams,(exam1+exam2)/2,exam1)

                  Hope this all makes sense to you,
                  Ray

                  Comment

                  Working...
                  X