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

Action Script: Copy Previous Field/Record

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

    #31
    Re: Action Script: Copy Previous Field/Record

    Yes, you are correct. This 'smells' like a job for Clifton. After all, it did go past him before being released. I think he needs to re-sniff the issue.
    Attached Files
    TYVM :) kenn

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

    Comment


      #32
      Re: Action Script: Copy Previous Field/Record

      I don't think this is really a bug or a problem, in my opinion
      in a form when you have five fields and want to enter data and the fields are in focus consecutively and the entry takes place without a flaw.
      however when you press the button the focus shifts to that button and alpha cannot copy that button since it is not a field nor does it have a previous value.
      but if you add in your actionscript
      object, activate and then select the field you want to activate, then the second action
      records, copy previous field
      (you can repeat as many time you want for other fields in the form)
      the previous value will be copied, I think while you are in the entry mode.
      so it is a matter of telling alpha what to do.
      I think that is what happens if you have a button that copies the whole record all the fields are copied without any problem.

      on a philosophical note, when you have a button and use it to copy previous value, you need to remember what the previous value was.
      when you have multiple entries you may forget what it is at that time.
      if you have a default value to copy on arrival you may be able to override if you do not like that value.
      thanks for reading

      gandhi

      version 11 3381 - 4096
      mysql backend
      http://www.alphawebprogramming.blogspot.com
      [email protected]
      Skype:[email protected]
      1 914 924 5171

      Comment


        #33
        Re: Action Script: Copy Previous Field/Record

        It's a docs bug.
        After a little correspondence with Selwyn, here is the latest:
        Selwyn tested it in v12 and reported that it works fine. I asked him if he could test it in v11, he did and also reported that it worked fine.
        so, I was trying to remember how I reproduced the error and managed to reproduce it again.
        Here is the latest email to Selwyn:

        Selwyn:
        I think it's a docs bug.
        The docs aren't clear on how to use it.
        I did more testing and found out the following:
        Use the same example you have, but place 2 buttons on the form:
        One button with topparent.new_record() only
        and the other topparent.copy_prev_field()
        If you put the form in "Enter" mode and
        Now, if you click the first button and start a new record
        then
        click the second button to copy the prev field value, you will get the error.
        If you start a new record by pressing the "New Record" icon from the toolbar, again, same error.
        In other words, these whole sequence of starting a new record, placing the focus (via code) in the desired field and copy the previous value, all has to occur without any user interruption of manually placing the focus in a certain field.
        Thanks

        Comment


          #34
          Re: Action Script: Copy Previous Field/Record

          What do you mean by "Docs bug"?
          TYVM :) kenn

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

          Comment


            #35
            Re: Action Script: Copy Previous Field/Record

            Improperly (inadequately) documented in the Help file.

            Comment


              #36
              Re: Action Script: Copy Previous Field/Record

              Originally posted by G Gabriel View Post
              Improperly (inadequately) documented in the Help file.
              Not sure I would call that a bug for two reasons. Inadequate docs is more of a poor documentation issue which is not unusual. Additionally, it's also the action script which has nothing to do with documentation. It is the code entered by Alpha. I have no idea what builds Selwyn is using but as mentioned in this thread, it also rears it's ugly head with v12. Maybe Selwyn , or you if he told you what/how he did it, would let us know what was done to get it to work?
              TYVM :) kenn

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

              Comment


                #37
                Re: Action Script: Copy Previous Field/Record

                I already mentioned it before.
                In my original response, or the second, I mentioned giving focus back to the field before using topparent.copy_prev_field().
                In my first email to Selwyn, I used a code where you, via xbasic, enter a new record, give focus to the field then use topparent.copy_prev_field().
                He tried what I submitted to him and it worked for him in those versions, 11 & 12.

                I was a bit baffled, how come I got the error and he didn't.
                I tried it in v8 and it worked.
                So, I backtracked and realized that, in my testing I had it broken down in two buttons: One starts a new record and another gives focus to the field and then copy the prev value.
                But also, in my testing, I changed the focus from one field to another before clicking the second button. Under this scenario, you get the error. But, if you do it without user interference as in:
                xbasic:
                start a new record (now you are in Enter mode)
                Give focus to the desired field
                Copy prev value.
                It works without errors.That's what I submitted to Selwyn and that's what he tested.

                If you manually give focus to a field, it throws the error.
                The document ion does not say any of that, it simply says if you have this code (topparent.copy_prev_field()) on a button, it will copy the previous value.
                Does not mention any of these qualifications, hence at best, it's lacking.

                Code:
                topparent.new_record() 
                your_field.activate()
                topparent.copy_prev_field()
                
                It will work as such.
                But, if you change the focus around to a different field, it won't work
                Last edited by G Gabriel; 02-09-2014, 05:25 PM.

                Comment


                  #38
                  Re: Action Script: Copy Previous Field/Record

                  G,

                  Thank you for your explanation. I added a couple rows of code to allow another field to copy as well.

                  topparent.new_record()
                  Lastname.activate()
                  topparent.copy_prev_field()
                  Firstname.activate()
                  topparent.copy_prev_field()

                  Alternatively, using action scripting works quiet well too, as long as the proper sequence of events is used. This will work quite nicely for me. Thank you for your time and persistence in this.

                  TYVM :) kenn

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

                  Comment


                    #39
                    Re: Action Script: Copy Previous Field/Record

                    No problem, but I still don't like it because I wanted to make it more flexible such that when the user points to any field (that you might not have had programmed initially) will be able to copy the previous value which is still doable with a little bit of finagling.

                    Comment


                      #40
                      Re: Action Script: Copy Previous Field/Record

                      As I think about this, it is a 3 step process, even doing it the manual way.

                      1. Enter new record mode.
                      2. Give the field focus (unless the first field is what should be copied)
                      3. Copy the previous field.

                      Once we realize the thought process, it's an easy thing to do and clearly the documentation is at fault.
                      TYVM :) kenn

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

                      Comment

                      Working...
                      X