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

invalid date error

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

    invalid date error

    I have searched and read with no joy.

    When you enter an invalid date into a form date field, A5 returns an error message " Constant operator is not recognized". I would like to evaluate the value before A5 with isdate() and make needed evets with code. But I can't find out how to interrupt/preclude the A5 error with code. The OnDepart field event doesn't work. The OnWrote field rule event does not work. How can I interject before the A5 eval? Thank you.
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

    #2
    Re: invalid date error

    Mike:
    Your question went un-answered. Not sure if others with v10 have the same error? In v8 I get "Invalid Date" as expected. So I am not sure if this is something unique to your application (which I don't think it is since your zip file is void of any other offenders) or it's a bug. Possibly the latter, though it is perhaps a bug in the sense that it is throwing a back-room error instead of the correct error.

    Nonetheless, and if only for academic reasons, if you wish to beat alpha to the bunch and evaluate the validity of the date before alpha takes a stab at it, I could see you do this by either:
    1-Evaluate the a_field_value in the Field Rules, or
    2-Evaluate the date with an OnKey script.

    But before embarking on this adventure, I am not really sure why is the timing? Can't you branch your code based on the date validity say in the CanChange, or OnChange? Nothing will be saved nor altered and you will have all the time to re-direct as you wish.

    Comment


      #3
      Re: invalid date error

      Mike, using vers 10.5 I see the same behavior you describe. Suggest you forward the zip file with a formal bug report. The error message is misleading and unhelpful.

      Developing a workaround is trickier than one might think.

      The isdate() function wants to work with a date_string. To convert the input from the user you'd have to use the dtoc() function to create the date_string. Guess what? Alpha throws an error with dtoc() if the "date" passed to it is not a valid date. It's the same error that Mike is seeing in the first place. Looks like a "Catch 22".
      Last edited by Tom Cone Jr; 08-19-2010, 10:28 AM.

      Comment


        #4
        Re: invalid date error

        Originally posted by Mike Wilson View Post
        I have searched and read with no joy.

        When you enter an invalid date into a form date field, A5 returns an error message " Constant operator is not recognized". I would like to evaluate the value before A5 with isdate() and make needed evets with code. But I can't find out how to interrupt/preclude the A5 error with code. The OnDepart field event doesn't work. The OnWrote field rule event does not work. How can I interject before the A5 eval? Thank you.
        this has been fixed. it will be in the next update.

        Comment


          #5
          Re: invalid date error

          This was supposed to be fixed in the NEXT update. With 3272-3589 and now with 3307-3591 you still get the error "Constant Operator Not Recognized" Evidently it did not make the cut for the last several updates.

          Or am I missing something?

          Tom Baker

          Comment


            #6
            Re: invalid date error

            Earlier in this thread I said that the bug would be fixed in an upcoming patch.

            I am not sure what I meant by this. There is no bug.

            if you go to the interactive window and type

            ?{13/13/01} you get an error saying that the constant operator is not recognized. this error is correct (although admittedly a little cryptic), since this is not a valid value.

            if you want to trap the error yourself in a table, you need to go to the canWriteField event in field rules and add this code:


            Code:
            dim datetext as c 
            datetext = "" + a_field_value.value
            if isdate(datetext) = .f. 
            	cancel()
            	ui_msg_box("Error","Invalid date")
                    'set value back to nothing
                    a_field_value = ""
            end if
            we can certainly look at improving the error message.

            Comment


              #7
              Re: invalid date error

              Selwyn

              I have one app that has over 450 tables - with many of them having user entered date fields. While they have calendar to check a date - fast typist like to enter a date by "hand". I find myself that it is easier to type 083010 then to look at the calendar, jog back to August and then find the date.

              I would take a change back to the old V8 way of just letting you know it was an invalid date (seems that the code you show in the fix, would be the backend of that reply in Version 8.

              While I know what the new message means, some of my users are scratching there head to understand what they did wrong and of course they get me involved.

              Would be nice to have the old v8 message back rather than going through the tables and pasting the fix to each and every date in the tables.

              Just my two cents worth.

              Tom Baker

              Comment


                #8
                Re: invalid date error

                Originally posted by Tbaker View Post
                Selwyn

                I have one app that has over 450 tables - with many of them having user entered date fields. While they have calendar to check a date - fast typist like to enter a date by "hand". I find myself that it is easier to type 083010 then to look at the calendar, jog back to August and then find the date.

                I would take a change back to the old V8 way of just letting you know it was an invalid date (seems that the code you show in the fix, would be the backend of that reply in Version 8.

                While I know what the new message means, some of my users are scratching there head to understand what they did wrong and of course they get me involved.

                Would be nice to have the old v8 message back rather than going through the tables and pasting the fix to each and every date in the tables.

                Just my two cents worth.

                Tom Baker
                go to the folder where a5v10 is installed.
                open alpha5.errors in notepad

                search for

                1512=

                change the error message to whatever you want.

                e.g.

                1512=Invalid date or time value

                Comment


                  #9
                  Re: invalid date error

                  Selwyn

                  Thanks, that will save me lot of time and headaches.


                  Regards
                  Tom Baker

                  Comment


                    #10
                    Re: invalid date error

                    Hmm. Repeat that after every installed patch ?/!
                    Most things are simple but unfortunately only after the first time

                    Comment


                      #11
                      Re: invalid date error

                      Ton

                      Or repeat that for every installation of the runtime.

                      The headache I was talking about was with my Warehouse Management with a lot of tables to be update with the code on the CanWriteField event. This make it easier - just correct the A5 errors file.

                      Maybe I should put this on the wish list

                      Tom Baker

                      Comment


                        #12
                        Re: invalid date error

                        so write a function to read the error file, determine if the change has been made, and if not make the change and save the error file.
                        Al Buchholz
                        Bookwood Systems, LTD
                        Weekly QReportBuilder Webinars Thursday 1 pm CST

                        Occam's Razor - KISS
                        Normalize till it hurts - De-normalize till it works.
                        Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                        When we triage a problem it is much easier to read sample systems than to read a mind.
                        "Make it as simple as possible, but not simpler."
                        Albert Einstein

                        http://www.iadn.com/images/media/iadn_member.png

                        Comment


                          #13
                          Re: invalid date error

                          Hi Al

                          Thanks - good advice.

                          Tom Baker

                          Comment


                            #14
                            Re: invalid date error

                            Why we must do Alpha's work?
                            A correct error definition must be part of the program.


                            However, If I can add an extra field for textmessages in my own language, hmmm and just compare the english old and new text...


                            What must I do now?
                            Shall I sell this idea to Richard to promote the International usage of Alpha Five?
                            Most things are simple but unfortunately only after the first time

                            Comment

                            Working...
                            X