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

Increment_value() ?

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

    Increment_value() ?

    Putting the final touches on a UDF that increment/decrement any and all types of fields, with various increments (tics)..etc.
    In a nutshell, an increment_value() on steroids.

    Just stuck at what initially seemed like a philosophical question, but as I think about further, I believe it's a bug.

    What comes after: "zzzzz" ?
    or any number of z's?

    if you use alpha's increment value(), here is what you get:
    Code:
    ?increment_value("zzzz")
    = "AAAA"
    I am not saying this is right or wrong, but it sounds like a function that car thieves will lobby the Congress for. Isn't this the equivalent of resetting your car odometer to zeros after exhausting all the 9's?

    That might work OK for a car odometer, but not in a table. This is in contradiction to numeric fields: if you try to increment a numeric field that reached it's limit of 9's, alpha wouldn't do it. So why does it do it for character?

    Well,, OK.. I am saying it's wrong.

    Anyone wants to lobby for or against car thieves? who have no character?

    #2
    Re: Increment_value() ?

    Originally posted by G Gabriel View Post
    What comes after: "zzzzz" ?
    or any number of z's?
    Usually breakfast... or if it's afternoon z's, then a snack.

    Comment


      #3
      Re: Increment_value() ?

      G,
      I would say it should increment upwards just like numbers do---999 incremented would be 1000 right...not 000. So I would think
      "zzzz" would become "zzzza"
      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


        #4
        Re: Increment_value() ?

        No.. maybe you are thinking:
        From zzzz to azzzz assuming space allows, but if it does not, it should stop. Same thing as if you autincrement and reach the field's limit, it stops, it doesnot reset back to 0000 nor should it reset back to aaaa.

        Comment


          #5
          Re: Increment_value() ?

          But... if it's increment_value() on steroids then it could be the users choice:

          Options:
          1. Autoincrement stops at selected value
          2. Autoincrement resets to azzzz
          3. Autoincrement resets to zzzza

          Comment


            #6
            Re: Increment_value() ?

            Stopping is not a matter of choice. If you have a numeric field of say 3 digits and you reached 999, that's it. Not auto-increment nor increment_value() can do anything about it nor any increment_value() on steroids or any other juice because you are bound by the field limits.

            But as it stands which I believe it to be a bug: if you have a character field of 3 character wide and you reached zzz, autoincrement will not reset it to aaa it will stop at zzz but increment_value() will reset it to aaa. that could have very serious consequences.

            Comment


              #7
              Re: Increment_value() ?

              Resetting and incrementing seems more right than stopping and doing nothing. The unique values is what you want. Although it may produce a problem, you would probably have a bigger problem if it just stops.

              Comment


                #8
                Re: Increment_value() ?

                Not at all. You certainly don't want that to happen particularly if the incrementing is in a parent in a set and is in a linking field. You could have a disaster in your hand if it resets where you have the wrong child records linked to the wrong parent and good luck trying to figure out later which is which.

                Comment


                  #9
                  Re: Increment_value() ?

                  If it stops incrementing, your links would still be wrong. So just make the field big enough so it never rolls over. But philosophically, the incrementing should never stop, therefore it has to reset at the end. If it stops then it's not an 'increment_value' function.

                  Comment


                    #10
                    Re: Increment_value() ?

                    Am with Rob on this....it would be a design flaw to not have enough field width to accommodate the auto-increment...and the same goes for using the increment function. Just because there is not enough room for it to continue (or having to stop) is not the function's fault and to accommodate this scenario is not strictly up to the function but the developer.

                    And yes, I agree that it would be most likely "azzzz"
                    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


                      #11
                      Re: Increment_value() ?

                      I agree with G. This is more than a philosophical question. The process should stop at "zzzz" and pop a message to the user "What do you want to do?".

                      Look what happens when incrementing "az". It goes to "BA", then "BB", etc.. The process will continue, if allowed, forever.

                      The philosophical question would be what if the autoincrement value reached infinity. What's next? Infinity +1?
                      Cliff

                      Coffee tastes better if the latrines are dug downstream from an encampment.
                      - US Army Field Regulations, 1861

                      Comment


                        #12
                        Re: Increment_value() ?

                        Originally posted by aRob View Post
                        If it stops incrementing, your links would still be wrong.
                        Sorry! wrong answer.
                        Alpha is smarter than you think.
                        Try it.
                        Alpha will not save the record. And then you are going to start wondering: "what the heck is going on?" And after days of pain and suffering you are going to post a question on the board: "Why is alpha refusing to save my record?" And you will get 15 different suggestions, then I will refer you back to this thread.

                        Originally posted by aRob View Post
                        the incrementing should never stop, therefore it has to reset at the end. If it stops then it's not an 'increment_value' function.
                        Sorry again!
                        Even Begala can't spin this one!
                        How do you equate a higher value produced by increment_value(), a function designed to INCREASE the value one increment at a time, with the starting base value?

                        In some aspect, you are correct:
                        increment_value() should not stop and that is correct, if you are incrementing a variable with perhaps a googlish figure. But if you are talking about a field in a table, the field is limited on how many digits or characters it can hold.

                        I will give you one caveat though: chances of reaching the max file limit is much higher than reaching the maximum z's , UNLESS your starting figure is high to begin with.
                        By the way: when did I ever suggest or advocate smaller digits (a design flaw) that would cause such occurrence? Of course it's a design flaw, but numeric fields do not have an unlimited space either.
                        Last edited by G Gabriel; 03-27-2009, 11:20 AM.

                        Comment


                          #13
                          Re: Increment_value() ?

                          In designing a control YOU lay out what the specifications for use are. To some degree it's up to the user (developer) to follow those rules governing the control. If you allow options for the control then the user would have to understand the implications of selecting those options.

                          Choose the best or most sensible rules in creating the control and then, if needed by users, build on it later.

                          Comment


                            #14
                            Re: Increment_value() ?

                            I have to jump in here.
                            First, I disagree with the answer that the next increment to zzzz is either zzzza or azzzz. Why?

                            If you use the numbering increment, it is more obvious what happens:
                            The number of characters for the value is infinite, and since we grow our values in English at least, from left to right, there is virtually an infinite number of "0" to the left of the visualized value. the value 999 is actually an infinite nuber of 0's in front of 999. When the three place value has reached it's limit, it then becones a 4 place value with the virtual "0" in position 4 to the left incrementing to a 1 and the three original characters reverting to the sequence base character, 0. So, the 9's become 0's. Soooooooo, with that philosophy in mind, the correct answer to the next value of incrementing an additional character is an added base character to the left, and the original three reverting to base values: zzzz -> aaaaa. Just like the increment from z is aa, not az.

                            And I agree with Gabriel that "stopping" when there is no slot available will halt the system, and far better than erroneous, misaligned records.
                            Last edited by Mike Wilson; 03-27-2009, 11:43 AM.
                            Mike W
                            __________________________
                            "I rebel in at least small things to express to the world that I have not completely surrendered"

                            Comment


                              #15
                              Re: Increment_value() ?

                              Yes Mike--your scenario is much better/makes much more sense.
                              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