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

Opening a form to "New Record"

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

    Opening a form to "New Record"

    How can I open a form to a "new record" without displaying a previously shown record?

    I have a form with an embedded browse showing existing records, as well as a button to click to enter a new record. When the user double-clicks on a row in the browse, it opens another form showing the details for that record. However, if you click on the "New" button, it opens that second form, but it shows the previously viewed record for a split second, before it goes to "new record". How can I avoid that record "flicker"?

    I am using Action Scripting on the "new record" button. I open the second form in "hidden, normal" mode and then do a "Enter new record" action hoping that the previous record will at least be hidden, but this doesn't work. It still "flickers" the old record.

    Any suggestions?

    #2
    RE: Opening a form to

    Sholom,

    The Action Scripting sequence I use goes like this:

    1) open the called form, hidden, normal (the form is based on the child table, not the set);
    2) begin new record in the called form;
    3) assign the link field value to the appropriate
    field object on the called form;
    4) set focus on the field object where the user should begin typing;
    5) show the form (actually, show the window).

    Is this what you're doing?

    Are you using a very slow machine?

    -- tom

    Comment


      #3
      RE: Opening a form to

      Tom,

      Just as a matter of interest couldn't Sholom set the Tab order so the selected field has focus when the form is opened?

      Keith Hubert
      London.
      Regards
      Keith Hubert
      Alpha Guild Member
      London.
      KHDB Management Systems
      Skype = keith.hubert


      For your day-to-day Needs, you Need an Alpha Database!

      Comment


        #4
        RE: Opening a form to

        I think I'm doing very similar to what you are prescribing, but shorter:

        1) Open the form (hidden, normal)
        2) Set to new record

        I am not actively showing the record because, I believe, the form will automatically show when I do some action to it, in this case set it to new record. That's what's happening, except that it's showing the record before it moves to new record, not after it moves, so it shows the old record for a split second.

        I'm using a fast enough machine (1 mHz).

        Comment


          #5
          RE: Opening a form to

          Sholom,

          As Tom stated, ALL actions before the window is shown should not be seen.

          If you open the form in "hidden, normal" then set it to new record THEN show it you would not see anything but the new record.

          I am not actively showing the record because, I believe, the form will automatically show when I do some action to it, in this case set it to new record.

          Not True! You Must show the window or it will stay hidden and risk giving you another instance of the form and/or leaving your table opened.

          Follow what Tom suggested in the order he suggested it and you should be fine.

          Scott

          Comment


            #6
            RE: Opening a form to

            I don't know, I must be doing something wrong. The form is showing even though I haven't explicitly told it to show.

            I am opening the form hidden, normal. No additional selection criteria.

            If that is all I do, the form stays hidden.

            But as soon as I add "Enter new record" (using "enter record into another form" and "parent level"), it automatically shows on the previously selected record, and then goes to a new record.

            Comment


              #7
              RE: Opening a form to

              Sholom,

              Try this. Put your action script for "enter new record" in the forms 'OnInt' event of the form your opening and then the "window show" action.

              Scott

              Comment


                #8
                RE: Opening a form to

                Thanks, but it didn't work.

                First of all, I get a flash on the screen of some window (I don't know what it is, it goes by so fast).

                Second, unless I can differentiate on the form between a request for a new record or a display of an old record, I would need duplicate forms for the same function - one for maintaining old record and one for new records. That would be a maintenance nightmare.

                Comment


                  #9
                  RE: Opening a form to

                  Sholom,

                  I just tried a few things and first I want you to know that you are correct. Opening the form as hidden normal does show when the enter new record action fires. I don't recall that being the way it worked, but so many changes .. its possible thats one of them.

                  Here is your solution.

                  Add a new inline xbasic action before the newrecord action with the following line:
                  ui_freeze(.t.)

                  See the attached screen shot.

                  Have a great day!

                  Scott

                  Comment


                    #10
                    RE: Opening a form to

                    That did it! (I was beginning to think that I was crazy.)

                    Thanks a lot.

                    BTW, shouldn't there be a "Open to new record" choice in the "Open form or Browse" genie on the "record selection" tab? I would use that many times. Am I the first person to want to open a form in this manner?

                    Comment


                      #11
                      RE: Opening a form to

                      Sholom,

                      Sanity checks have been a standard routine for me lately, so don't feel bad, your not crazy.

                      To be honest with you, your idea is not a bad one at that, and to me, doesn't seem like it would be a hard option to add. I am sure alot of people open forms in enter mode ..

                      Have a great day!

                      Scott

                      Comment


                        #12
                        RE: Opening a form to

                        Where/to whom would I address such a suggestion?

                        Comment


                          #13
                          RE: Opening a form to

                          I have been able to open a form and enter a new record using the following code which was adapted from Alpha Sports. The form is called "Confirmed".


                          DIM Shared varP_Confirmed as P
                          DIM layout_name as c
                          layout_name = "Confirmed"
                          varP_Confirmed = :Form.load(layout_name,"dialog")

                          'Execute inline Xbasic code.
                          :Confirmed:Button2.activate()
                          :Confirmed:Button2.push()'This button Enters a New record

                          'Inline-Xbasic. Converted from: Activate object 'ENQUIRYNON' in Form 'Confirmed' .
                          'Activate object 'ENQUIRYNON' in Form 'Confirmed' .
                          DIM window_name as C
                          window_name = ":"+"Confirmed"
                          DIM varP_Object as p
                          'Get a pointer to the specified window
                          varP_Object = obj(window_name)
                          'Check if the specified window exists
                          if .not. is_object(varP_Object) then
                          ui_msg_box("Error","The window '"+window_name+"' does not exist.",ui_stop_symbol)
                          else
                          varP_Object:ENQUIRYNON.activate()
                          end if

                          'Show in Form 'Confirmed' .
                          DIM object_name as C
                          object_name = ":"+"Confirmed"
                          DIM varP_Object as p
                          'Get a pointer to the specified object
                          varP_Object = obj(object_name)
                          'Check if the specified object exists
                          if .not. is_object(varP_Object) then
                          ui_msg_box("Error","The object '"+object_name+"' does not exist.",ui_stop_symbol)
                          else
                          varP_Object.show()
                          end if

                          'Refresh data in current form at parent level.
                          'Can only resynch data in View mode, so save record first to be sure that layout is in View mode.
                          topparent.Commit()
                          topparent.Resynch()
                          topparent.Refresh_Layout()

                          'Activate the Object that Previously had focus.
                          dim previous_object_Name as c
                          previous_object_name = topparent.Active_Prev()
                          if previous_object_name "" then
                          dim previous_object as p
                          previous_object = obj(Previous_object_name)
                          previous_object.activate()
                          end if

                          'The following code must be executed as the last step in the script.
                          'The user has closed the dialog form, but it is still in memory. Remove it from memory.
                          if is_object(varP_Confirmed) = .t. then
                          varP_Confirmed.close()
                          end if




                          Comment


                            #14
                            RE: Opening a form to

                            Sholom,

                            Selwyn Rabins would be the man that would do it if he felt it was worth the time.

                            Scott

                            Comment


                              #15
                              RE: Opening a form to

                              Sholom,

                              Now that you have it working, use the binoculars to check the xbasic code underneath the covers. You'll find it quite simple. When I need this sequence I usually write it in inline xbasic. If an example showing this would be of use, let me know.

                              -- tom

                              Comment

                              Working...
                              X