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

hiding a form when creating new record

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

    #16
    Re: hiding a form when creating new record

    Nick,

    See the attached screenshot. The form.load allows a "pixel_coordinate". I set it to a negative number forcing the form off screen. This seems to work although I have not tried it in a production environment. The form will not show until it hits the qq:firstname.activate(). Not sure why you need that but if you comment it out you never see the form.


    http://screencast.com/t/cqUHXHlGYp


    Rod
    Attached Files

    Comment


      #17
      Re: hiding a form when creating new record

      Nick,

      I was looking for a work around to your problem. The position property of the form.load method accepts a "pixel_coordinate" value. In the attached database you'll see I set that property to a large enough negative number to position the form off screen, and filled in the values. You can then use the Center Window button to the bring the form into view, finish entering data and save.

      Form_Load.zip

      Hope this gives you another option.

      Comment


        #18
        Re: hiding a form when creating new record

        OK, check out the attached database. If you select the autolog button on the message input form you will see that the called form with a new record does not hide, with a separate hide command. It just does not work.
        If you use action scripting and select the "hide" option, that does not work either.
        Attached Files

        Comment


          #19
          Re: hiding a form when creating new record

          Hi Nick,
          Just an observation, but while you are playing with this form hiding script - are you remembering to close it before you attempt the script again? Because multiple instances will have different aliases...which might be why it is not working too well for you.
          Robin

          Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

          Comment


            #20
            Re: hiding a form when creating new record

            Nick,

            I see what you are saying in Action Scripting, the only thing I can see that might be making the form visible is using AS to enter the text. I added a couple more buttons to your form which will allow you to do what you want using XBasic but I couldn't make in work in AS either.

            testhidden2.zip

            Hope it helps.

            Comment


              #21
              Re: hiding a form when creating new record

              Try this modification for Button5 - note the use of a COLON after the pointer and before the field

              dim SHARED qq as p
              qq=form.Load("input or view message","","","0","0")
              'qq=form.Load("input or view message","","","-700","-700")
              'qq.hide()
              qq.New_Record()
              'sleep (2)
              qq:Source.text = "Auto"
              qq:Message.text = "Robin's Message w/xbasic"
              'qq.message.activate()
              'sleep (2)
              qq.Commit()
              qq.close()
              Robin

              Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

              Comment


                #22
                Re: hiding a form when creating new record

                Robin,

                Thanks very much. Never even thought to try "0" in the position argument,

                qq=form.Load("input or view message","","","0","0")

                and with the other mistakes I'm surprised it ran at all, Alpha is so forgiving sometimes.

                Thanks again, Rod

                Comment


                  #23
                  Re: hiding a form when creating new record

                  I only put the '0','0' in there in case the form did display - I wanted to see it. The Help says to use 'left','top'. As for catching the colon - dragging and dropping from the XB explorer is a great help for remembering that one. The alternative to using a pointer would be
                  formname:field.value therefore it is equal to topparent:field.value - which is a pointer to the form.
                  Robin

                  Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                  Comment


                    #24
                    Re: hiding a form when creating new record

                    Yes, that's a workaround.
                    You can also avoid the issue by opening the form as a hidden dialog, then of course it won't show, but that has other issues. But the basic issue is that this is a bug; particularly so in action scripting because the AS setup specifically asks you if you want to hide the form, and then it does not do it.

                    Comment


                      #25
                      Re: hiding a form when creating new record

                      The suggestion that it is a bug that when you open a form in hidden mode and then say you want to go to the new record the form is shown is wrong.

                      it is not a bug.

                      it is nonsensical to say that you want to open a form in hidden mode and navigate to the new record.

                      the very act of navigating to the new record unhides a previously hidden form, as shown in this interactive window session:




                      f = form.view("customer Information")
                      f.hide()
                      'this next command will cause the form to show
                      f.New_Record()
                      f.close()

                      Comment


                        #26
                        Re: hiding a form when creating new record

                        Hi, Selwyn.

                        Yes, it's nonsensical to hide a form if you then want the user to immediately begin filling in a new record. However, it's often very handy to begin a record for the user, filling in certain fields for them, before showing them the hidden form. This very easy to do using xbasic scripting. Would be a nice enhancement for your action scripting customers.

                        Comment


                          #27
                          Re: hiding a form when creating new record

                          in my opinion:

                          if your xbasic sets values in the fields after the form is shown, it will happen so quickly that the user will never know if the fields were filled in before the form was shown, or after the form is shown.

                          the only relevant issue is whether the fields have been filled in when the user starts entering his information.

                          Comment


                            #28
                            Re: hiding a form when creating new record

                            Yes, we know that the new_record will cause the form to show, but if you hide the form AFTER the new record command it does not hide either.
                            Go to open a form using action scripting. Specify you want to open a form hidden with a new record. The action script xbasic does not even try to hide it. But if you follow the action script with a hide window command it does not hide it either. Once the new record has been opened, the window won't hide at all.
                            \
                            So if you look at the xbasic for the test example I posted, the hide () command does nothing:
                            dim global vnew as l
                            vnew=.t.
                            dim ptr as p
                            ptr=form.load ("input or view message")
                            ptr.new_record()

                            ptr.hide()
                            sleep (6)
                            ptr.message.text="Message created"
                            ptr.message.activate()
                            ptr.close()

                            Comment


                              #29
                              Re: hiding a form when creating new record

                              I did this in the interactive window (inside alphasports)


                              f = form.view("customer Information")
                              f.hide()
                              f.New_Record() 'this causes the form to show
                              f.hide() 'this causes the form to hide

                              so the statement that the form cannot be hidden after navigating to the new record does not appear to be true.

                              Comment


                                #30
                                Re: hiding a form when creating new record

                                two points.
                                First, the action scripting clearly gives you the option to hide the form even with a new record, and it just won't do that.
                                Second, there may be cases where I fill in ALL the data programatically and the user does nothing; in these cases the form appears even though the user is not expecting it to. Or I have one case where I create a new record, and fill in some of the fields in the parent, then create the children by copying data from one table to another, then activate the browse. Without the ability to hide the form, what the user sees is a half-completed form, then the rest of the data appearing later when the browse is activated, because it takes a measurable time to copy the child records.
                                I know I can probably work around these situations. But if the hide () coomand worked, I would not need to.

                                Comment

                                Working...
                                X