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

now what?

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

    now what?

    Hi Phorum,

    I am using Tom's advice and got rid of the "isblank routine"; however
    I have a similar problem. Using the following code, it never prints
    the mesage box no matter what i enter into strt_date and end_date.


    dim strt_date as d
    dim end_date as d
    if ("alltrim(dtoc(strt_date))")="0" then
    ui_msg_box("Invalid date","Both starting and ending dates must be specified")
    ' end
    end if
    'if dtoc(end_date)

    I have the second if statement commented out for test purposes.

    Thank you,
    efs

    #2
    RE: now what?

    Use dtos() not dtoc() otherwise you wind up with slashmarks in the char string.

    Remember to test for the length of the trimmed string. If the length of the
    trimmed string is zero the date field is blank.

    From the interactive editor:
    dim startdate as D
    ?dtoc(startdate)
    = " / / "

    ?len(alltrim(dtoc(startdate)))
    = 4.000000

    ?dtos(startdate)
    = " "

    ?len(alltrim(dtos(startdate)))
    = 0.000000

    Comment


      #3
      RE: now what?

      Tom, have you found the comparison:
      if field or variable={}
      to be unreliable. When I first started using Alpha, 4.01, I found that to return unreliably, but now, 4.5, it saeems to always work.
      Cole Custom Programming - Terrell, Texas
      972 524 8714
      [email protected]

      ____________________
      "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

      Comment


        #4
        RE: now what?

        Martin,

        I'm glad to hear it. However, I can't confirm it because I'm not using vers. 4.5 yet. (I've purchased it, but have chosen to delay distributing it to my customers. Until I do that I prefer to continue doing support and maintenance work with the same version my customers are using.)

        -- tom

        Comment


          #5
          RE: now what?

          Yes, I agree absolutely. Now - wait till we start gettting clients with XP as they buy new computers, mixed with 98 and ME!!
          Cole Custom Programming - Terrell, Texas
          972 524 8714
          [email protected]

          ____________________
          "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

          Comment


            #6
            RE: now what?

            Hi Tom,

            I still get the message print out with the following code:

            dim strt_dat as d
            dim end_dat as d
            if dtos(strt_dat)="".or.dtos(end_dat)="" then
            ui_msg_box("Invalid date","Both starting and ending dates must be specified")
            ' end
            end if

            Comment


              #7
              RE: now what?

              Normally, when I check for the existance of a date entry, I use

              if alltrim(cdate(date_field))=""
              ' code to run
              end if

              Cdate() and dtos() should give the same result, but you still must use alltrim() to eliminate any blanks. Your original code had a problem where you used quotations. When you use quotations, everything within the quotations is considered a character string. This resulted in comparing one character string to another character expression. You would never get a match, since the character string "alltrim(dtoc(strt_date))" will never = the character string "0".

              if ("alltrim(dtoc(strt_date))")="0" then

              should read

              if alltrim(dtoc(strt_date))="" then

              To take the last code you posted and modify it, you would get

              if alltrim(dtos(strt_dat))="".or.alltrim(dtos(end_dat))="" then
              ui_msg_box("Invalid date","Both starting and ending dates must be specified")
              ' end
              end if

              Of course, all this fails if you have specified a starting default value for the dates.

              Jerry

              Comment


                #8
                RE: now what?

                Sorry, the line

                if alltrim(dtoc(strt_date))="" then

                should read

                if alltrim(dtos(strt_date))="" then

                It is easy to get the 2 mixed up, which is why I use cdate()

                Jerry

                Comment


                  #9
                  RE: now what?

                  From the interactive editor:

                  dim startdate as D
                  ?dtos(startdate)
                  = " "

                  ?alltrim(dtos(startdate))
                  = ""


                  See the difference?

                  -- tom

                  Comment


                    #10
                    RE: now what?

                    Hi Tom & Jerry,

                    On the same form with the button that has the code on it, I enter the
                    dates before I hit the button. There are no defaults. I added the
                    all trim to both sides of the or gate, but it still prints the message box when when both dates are entered.

                    Thank you for your time and patience,
                    efs

                    Comment


                      #11
                      RE: now what?

                      ver 4.5 interactive editor

                      dim tdate as d
                      ?tdate
                      = { / / }

                      if tdate={}; ui_msg_box("",""); end if

                      the above returns correctly if the date is empty, even though it shows a value

                      try this in version 4.03
                      Cole Custom Programming - Terrell, Texas
                      972 524 8714
                      [email protected]

                      ____________________
                      "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                      Comment


                        #12
                        RE: now what?

                        Hi Martin,

                        First, thank you for your time and patience. It still does the same
                        thing with the following code:

                        dim strt_dat as d
                        dim end_dat as d
                        if end_dat={}.or.strt_dat={} then
                        ui_msg_box("Invalid Date","Both starting and ending dates must be specified.")
                        end if
                        end

                        Thank you again,
                        efs

                        Comment


                          #13
                          RE: now what?



                          EFS:
                          Run this in a global script, then remove the rem marks from the two dim
                          lines. I am assuming strt_dat and end_dat had valid date values from the
                          form to begin with. (You can rem out the first four lines and place the
                          code on the button on the form to find out their values.)
                          strt_dat = ctod("01/01/1980")
                          end_dat = ctod("01/01/1990")

                          'dim strt_dat as d
                          'dim end_dat as d

                          ui_msg_box("STRT_DAT",dtoc(strt_dat))
                          ui_msg_box("END_DAT",dtoc(end_dat))

                          if end_dat={}.or.strt_dat={} then
                          ui_msg_box("Invalid Date","Both starting and ending dates must be specified.")
                          end if

                          end
                          Hope this helps...
                          Craig

                          Comment


                            #14
                            RE: now what?

                            Jabb, I presume you are getting the date values after you declare them - if not then try the following amendment.

                            dim start_date as d
                            dim end_date as d

                            loop:
                            start_date=ctod(ui_get_date("Enter the beginning date",""))
                            end_date=ctod(ui_get_date("Enter the ending date",""))
                            if start_date={} .or. end_date={}

                            'this little extra gives them a way out
                            '4= ui_yes_no + 16=ui_stop = (4 + 16) = 20
                            response=ui_msg_box("Error","error message - continue?",20)
                            if response = 6 'ui_yes_selected
                            ---goto loop
                            else
                            ---end
                            end if

                            end if

                            if start_date > end_date

                            response=ui_msg_box("Error","range error message - reenter?",20)
                            if response = 6 'ui_yes_selected
                            ---goto loop
                            else
                            ---end
                            end if
                            Cole Custom Programming - Terrell, Texas
                            972 524 8714
                            [email protected]

                            ____________________
                            "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                            Comment


                              #15
                              RE: now what?

                              oops!
                              add one more "end if" at the bottom!
                              Cole Custom Programming - Terrell, Texas
                              972 524 8714
                              [email protected]

                              ____________________
                              "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                              Comment

                              Working...
                              X