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

Why Doesn't this work?

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

    Why Doesn't this work?

    Guys:

    I have a reconcile routine written for my alpha checkbook and want a field to comment on the success [or failure] of the reconciliation.

    Simple enough, I want the calculated field to display either 'Whoops' or 'You Balanced' as seems obvious to an old A4 writer with the expression below.

    if(calc->cbal0,"Whoops","You Balanced")

    Why doesn't this work? Am I missing some syntax somewhere. Mind you all now if Calc->cbal is Zero 'You Balanced' should display - right - or have I gone completely bananas?

    The calc field must certainly be numeric eliminating the need for quotes on the Zero - Right? I see, 'Inexact Match' in the expression builder at times in the 97 ways I've tried to write this.

    Any Clues? For God's sake, don't anyone dwell on this as it is obviously not 'do or die' important. It's solution, however, might augment my understanding of this freakin' system [which on the other hand is awesome as well].

    Ken the Newbie

    #2
    RE: Why Doesn't this work?

    Ken the Newbie,

    You don't say where the calculated field "is". If it is on a form or a report, I can't see a problem. If you are referring to a calculated field in a table, which I don't think you are, then the field rules would have to be re-evaluated for the whole table.

    You don't specify the calculation for calc->cbal. If the expression is something like debits - credits, how should Alpha evaluate it if both values are blank? That might lead to the 'inexact match' response. Try if(isnotblank("debits").and.isnotblank("credits")), debits-credits,0).
    There can be only one.

    Comment


      #3
      RE: Why Doesn't this work?

      Ken,

      I think you have a great idea, "Whoops" or "You Balanced"

      If you haven't already done so, try searching the board using "A4 and expression" (quotes not included). There's been discussions in the past about converting A4 expressions to A5 expressions. Perhaps you might find that clue.

      kenn
      TYVM :) kenn

      Knowing what you can achieve will not become reality until you imagine and explore.

      Comment


        #4
        RE: Why Doesn't this work?

        Stanley,

        The Calc field is on the form and the form has an imbedded browse. The 'Cbal' calc is based on two browse summary totals and a numeric field value from another form.

        Look, All of the math works and displays properly on the form each time it is run. Both this text field and the references for the '0' or other amounts are on the form - not in the imbedded browse. This is not a report.

        The current expression above DOES NOT get an "Inexact Match" message, the damned thing just doesn't work.-Displays 'Whoops' all the time - even when the 'cbal' field shows '0.00'

        Thanks - For god's sake don't spend a lot of time on it.

        Newbie Ken

        Comment


          #5
          RE: Why Doesn't this work?

          Ken,

          Try displaying the calc field on your form, just to verify that the expected value is there. A blank numeric field will often be evaluated by xbasic as a very big number, which would always not equal zero. I'm wondering whether this might be what you are experiencing here. i.e. if for some reason the calc expression is not completing, the field may be blank, which would probably evaluate to non-zero. Since this is counter-intuitive I thought I'd mention it.

          -- tom

          Comment


            #6
            RE: Why Doesn't this work?

            Ken,
            Another possibility is that the calculated field may not evaluate to exactly zero depending on how it is calculated. It may be something like .00000001. For reliability, I always round off calculated fields. For currency numbers, use:

            round(cbal,2)

            Jerry

            Comment


              #7
              RE: Why Doesn't this work?

              If I recall correctly, I have had similiar type problems with things not working if the tables were empty; had no records.

              Sorry if this sounds like a silly question, but do your tables have any records in them to perform the calculation on?

              Mike
              Thank you,
              Mike Konoff

              Comment


                #8
                RE: Why Doesn't this work?

                Ken,

                For many who respond, the time spent on the problem is not the issue, it's the challenge of solving the problem. Everyone, benefits form a solved problem.

                Good luck,

                Kenn
                TYVM :) kenn

                Knowing what you can achieve will not become reality until you imagine and explore.

                Comment


                  #9
                  RE: Why Doesn't this work?

                  Thanks again to everyone for your input.

                  It still doesn't work. I've spent, now, hours thinking as you do, that the solution will bring light to the learning process. It didn't.

                  Thanks anyway.

                  Comment


                    #10
                    RE: Why Doesn't this work?

                    Ken,
                    Just a thought. Why not try

                    if(round(calc->cbal,2)=0,"You Balanced","Whoops")

                    For some reason, I has seen this work when the didn't. Also, are you sure that cbal is actually calculated before the expression runs? I managed to do that once or twice. Where is the expression located? One way to check the calculation order is to set the initial value of cbal to 0, possibly on the OnInit event for the form. If cbal is not being calculated, it will be zero and "You Balanced" will always popup.

                    Don't worry about spending time on "simple" problems. Even a simple bug can destroy a good program. I have spent hours trying to find why something doesn't work as I expect it. By the way, I also like the use of "Whoops". Everyone needs a sense of humor.

                    Jerry

                    Comment


                      #11
                      RE: Why Doesn't this work?

                      Jerry:

                      Thank yo so much for your interest. I did, indeed try the syntax you suggested - many times. Each time I entered it in the expression builder the status [evaluate] line said " This can not be evaluated at this time" --- no error dialog and this would seem O.K. Then when I attempted to save the change with the underlying "OK" I got a Windows - 'Illegal Operation' and shut down dialog and which closed out the whole program. [One of these days one of us is going to be convicted by Microsoft Cops and do hard time for this].

                      This is for information only for God's sake don't spend any time on it.

                      Thanks Again

                      Comment

                      Working...
                      X