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

    hiding a form when creating new record

    When you open a form using action scripting, and specify you want it to open "hidden", the form will not be hidden if you are opening a new record, it simply does not work. In response to an earlier posting, someone speculated that opening a new record "unhid" the form. But even if I use xbasic ( form.hide() or sys_id_hide() )to hide the window AFTER the form is opened with a new record, it still won't hide.
    Any suggestions?

    #2
    Re: hiding a form when creating new record

    Sorry Nick, you have lost me.
    Why would you want to hide a form when you are creating a new record?
    Is the Create happening in the background? If so, you can avoid opening the form until the data has been entered into the table(s).
    Please explain if you have time.
    See our Hybrid Option here;
    https://hybridapps.example-software.com/


    Apologies to anyone I haven't managed to upset yet.
    You are held in a queue and I will get to you soon.

    Comment


      #3
      Re: hiding a form when creating new record

      I had a similar issue back in v5 when I wanted to hide a form when opened to view another....in my case it was, at the time, the only way to obtain the necessary information for the second viewed form....my solution was to have the first form opened smaller than the second one (the one wanted to be seen) and making the second one modal (and larger), thus obscuring the first.
      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: hiding a form when creating new record

        Let's try a simple (!) example. I have a form which allows a user to create a new inventory item, where the user inputs all the data. I also need to create new inventory items from other sources such as receiving, returns, RMAs etc, where some of the data is being created by the application and some of it by the user. In those cases, I want to open the form, hidden, fill in the data that is being created by the application, and then display the form to the user.
        I could of course create a new record in the table itself, and then display the form partially filled with data extracted from the table, but there are a lot of complications doing that because there are actions embedded in the form that I would have to duplicate in the code that created the new record in the table. I would also have to be able to "back out" table entries that the user decided to cancel for some reason - using the form to create the data and then allow the user to discard it before it gets into the table is much easier.

        And it all goes back to the initial question - the action script gives you the option to hide the form, there are two different xbasic command to hide the window, and none of them work.....

        Comment


          #5
          Re: hiding a form when creating new record

          The only way I can think of at the moment is to Minimise the Form which will allow you to enter data, and then resize it.
          It will show on the bottom line however, but as Mike mentioned, you could hide it behind another form.
          See our Hybrid Option here;
          https://hybridapps.example-software.com/


          Apologies to anyone I haven't managed to upset yet.
          You are held in a queue and I will get to you soon.

          Comment


            #6
            Re: hiding a form when creating new record

            Nick,
            If you first use form.load(), create a "New_Record()" and then set your values, the form will show the data ready for your user. So long as you have not saved the data you can still use the Cancel Changes and the prior record will show up instead of a new blank one.

            Is this not happening in your case?
            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


              #7
              Re: hiding a form when creating new record

              Nick,
              If you can't do what Mike suggests, you have something else going on that is at odds. Maybe it has to do with -

              ....because there are actions embedded in the form that I would have to duplicate....
              Mike W
              __________________________
              "I rebel in at least small things to express to the world that I have not completely surrendered"

              Comment


                #8
                Re: hiding a form when creating new record

                form.load loads the form
                As soon as you create a new record, the form becomes visible, even without form.show
                The hide commands will not hide it.
                You can try it with a simple form, nothing to do with my application...

                Comment


                  #9
                  Re: hiding a form when creating new record

                  Nick,
                  As soon as you create a new record, the form becomes visible, even without form.show
                  Correct....but even so does it not do as you want....have the data entered prior to the user seeing it?

                  Also, I successfully used the .Hide() function in the interactive window with the following:
                  qq=form.Load("test_form_new_Record")
                  qq.New_Record()
                  qq.First_Name.value="aaaaTest"
                  qq:first_name.activate()
                  sleep(4)
                  qq.Hide()
                  qq.Close()
                  Seems like it is time to provide a sample illustrating the issue for us!
                  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


                    #10
                    Re: hiding a form when creating new record

                    Hiding the form after the new record command does not work. It will work fine once the form is activated. Try this
                    qq=form.Load("test_form_new_Record")
                    qq.New_Record()
                    qq.hide()
                    sleep (6)
                    qq.First_Name.value="aaaaTest"
                    qq:first_name.activate()
                    qq.Close()
                    You will see that the hide command has no effect, the form stays visible instead of being hidden. If you use action scripting to open the form with a new record, and specify you want the form to be hidden (in the action script setup) same situation, it does not get hidden.

                    Comment


                      #11
                      Re: hiding a form when creating new record

                      Nick,
                      works here (hides the form and will save the data if you add qq.commit() ). With the code changed as you have it though I see no reason to have the qq.activate(). Regardless, the only way I think we will be able to help you is if you attach a sample showing the issue (unless others can see the issue).

                      I am still confused as to what is actually wanted....seemed like initially you wanted to load data into the form whilst hidden and then show it to the user in order to enter in more data. And from what I have seen what has been given works for that - not saying it is working on Your machine though....and if not then again I can't see the exact scenario you have from here!
                      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


                        #12
                        Re: hiding a form when creating new record

                        I agree with Mike:
                        if you say
                        f=form.load("xxx")
                        f.new_record()
                        set the values of several or many fields

                        the values will be filled in before the client even sees it, and it will then be available to the client for further entry

                        another approach is to open the table and create a new record using xbasic, fill in certain fields, save the record, get the recno(), close the table and open the form and have it go to that record - this will definitely not let the client see anything until you want them to.
                        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


                          #13
                          Re: hiding a form when creating new record

                          "another approach is to open the table and create a new record using xbasic, fill in certain fields, save the record, get the recno(), close the table and open the form and have it go to that record - this will definitely not let the client see anything until you want them to. "

                          Posts #2 and #4 sort of cover this Martin.
                          An example to fiddle with would be great Nick
                          See our Hybrid Option here;
                          https://hybridapps.example-software.com/


                          Apologies to anyone I haven't managed to upset yet.
                          You are held in a queue and I will get to you soon.

                          Comment


                            #14
                            Re: hiding a form when creating new record

                            I'll post back later today with an example. FYI I can't easily take the approach you mention because the record can't be saved when it is partially complete, it violates a number of field rules and there are mandatory fields that are part of the data the user enters.

                            Comment


                              #15
                              Re: hiding a form when creating new record

                              mikec - the code as I layed out in post #10 above definitely does NOT work, I attached it to a button on my test form. The .hide statement does NOT hide the form. The form stays visible until you close it.

                              Comment

                              Working...
                              X