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

Using same table for textbox results and browses

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

    Using same table for textbox results and browses

    Is it me... or is not it actually possible to use the same table for both textboxes/comboboxes and a browse on the same form, in that, when data is entered on the textboxes/comboboxes, the data will not immediately display its result on the browse not until the onClick event is fired to save or to delete the result from the browse?

    I've been trying to make this work with no end. It looks simple, but just couldn't make it work :) Please can anyone tell me how this is accomplished, or if I'll have to make use of a set (how to make the relationship)...to make this possible.

    I will really appreciate it.

    Thanks a lot.

    Aaron.

    #2
    Re: Using same table for textbox results and browses

    What?
    Question 1. It is possible to have a browse and fields on a Form at the same time. If you change data in either the form object or the browse object, you will get the corresponding change when you Save. You can save automatically when leaving the field so the two are in synch.

    Question 2. You don't need a set if you are only working with one table.

    Please post an example of where you have gotten to.
    Control Panel (CP
    ..Tools
    ...Zip
    Forum
    ..Go Advanced
    ....Manage Attachments
    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: Using same table for textbox results and browses

      Hello Ted,

      Thank you very much for your reply. I am working with One table (Specialty) as primary table, and (Department) as linked table to the Specialty table.

      I've attached a photo giving brief description of each form object, and a .ZIP file of the database:
      HMSDB.zipspecialty_sample.jpg .

      Description of form objects and browse as labeled on the photo, with expected desired results:
      -------------------------------------------------------------------------------------------
      1. Add records to the Department table: The Add button [+] will popup a dialog box form for Department table, and after the data is entered, the Save button on the Department table dialog box will insert the data on the Department table. This saved data will then be available on the Department Drop-down ComboBox of the SpecialtyForm.

      2. Deletes selected record from the Department table through the "Department Textbox": When a record is selected from the Department Textbox, it can be deleted from the Department table by clicking the Delete button [X] close to the Department Textbox object

      3. Performs the onClick events to INSERT (Save) inputted data from the form objects to Browse object, UPDATE (Edit) and DELETE selected record(s) from the Browse object: When data is entered on the form objects (Department, Specialty), the Save button above the browse will Save the form object's data on the browse object (Department, Specialty).

      Also, the browse should not have the ability to add or edit data directly on it, but through the form objects above ( Department comboBox and Specialty TextBox ). When a row is selected on the browse, the DELETE button can directly delete the row from the browse object. This should be the only means of deleting data from the browse record.

      4. The saved record will not display on the Browse object until the "Save" button is clicked and the page refreshed: When the data is saved by clicking the Save button (3 above), the page will refresh, and the datas from the Department Combobox and Specialty TextBox will now display on the Browse object below the Form objects. The entered data on the form objects will not display on the browse object until the SAVE button is pressed.

      I hope this information clarifies my issues on the previous post.

      Thanks a lot

      Aaron.
      Last edited by aaronhaul; 01-14-2012, 06:00 AM. Reason: Files has been attached

      Comment


        #4
        Re: Using same table for textbox results and browses

        Hi Aaron,
        Why is the OnInit event of the form clearing the fields in the first record of the speciality table when the form opens? It seems you are also doing this in the department form when it opens so a new record is not added but is also blanking out the first record.
        Robin

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

        Comment


          #5
          Re: Using same table for textbox results and browses

          Aaron,
          I love your deliberate use of database language to convey your message. However, it seems that the concepts that you are portraying are a bit confused.
          3. Performs the onClick events to INSERT (Save) inputted data from the form objects to Browse object, UPDATE (Edit) and DELETE selected record(s) from the Browse object:
          I am not familiar with an OnClick event. Are you referring to a button OnPush event? The fields on the form and the Browse are both form objects. They are windows to the table that is behind them. You can insert values from one form object to another, but you cannot "save" values to form objects. The concept of save only relates to a table. You cannot save to a layout or layout object. You can only save values to a table. Once you save a value to a table, it can be displayed in a form object.
          when data is entered on the textboxes/comboboxes, the data will not immediately display its result on the browse not until the onClick event is fired to save or to delete the result from the browse?
          True, because the browse object is a window to the table behind it. The values in the form field objects are not part of the table that the browse is "showing" until the values are saved to the table. Then the Browse can "show" the values.
          Mike W
          __________________________
          "I rebel in at least small things to express to the world that I have not completely surrendered"

          Comment


            #6
            Re: Using same table for textbox results and browses

            Hi Robin,

            My intention is to make the form fields blank, ready for data, when the OnInit event is triggered. I don't know if there's a way to make this possible without clearing the first record of the specialty and department table, but just the form fields.

            Comment


              #7
              Re: Using same table for textbox results and browses

              Originally posted by MoGrace View Post
              Hi Aaron,
              Why is the OnInit event of the form clearing the fields in the first record of the speciality table when the form opens? It seems you are also doing this in the department form when it opens so a new record is not added but is also blanking out the first record.
              My intention is to make the form fields blank, ready for data, when the OnInit event is triggered. I don't know if there's a way to make this possible without clearing the first record of the specialty and department table, but just the form fields.

              Comment


                #8
                Re: Using same table for textbox results and browses

                My intention is to make the form fields blank, ready for data, when the OnInit event is triggered.
                Aaron, your table field objects are bound to the underlying table. When you clear fields you're deleting field values from the the current record. Not a recommended way to begin a new record. I suggest you spend some time working through the user's guide and playing with the default form for your table. You're using techniques that are necessary with other development packages but are NOT necessary here.

                Comment


                  #9
                  Re: Using same table for textbox results and browses

                  Thank you for your reply, Mike,
                  I am not familiar with an OnClick event. Are you referring to a button OnPush event?
                  Yes Mike, I was referring to a button OnPush event, and not OnClick event.

                  The fields on the form and the Browse are both form objects. They are windows to the table that is behind them. You can insert values from one form object to another, but you cannot "save" values to form objects. The concept of save only relates to a table. You cannot save to a layout or layout object. You can only save values to a table. Once you save a value to a table, it can be displayed in a form object.
                  Since I cannot save values from one form object to another, can I insert values to the browse object from the Department and Specialty form objects? If that's actually possible, how can I do this by making the result not display on the browse not until the OnPush event is fired? With all this information, can you please make necessary adjustments to the database I attached so I can continue with your solution?

                  Thanks a lot for your effort.

                  Aaron

                  Comment


                    #10
                    Re: Using same table for textbox results and browses

                    Originally posted by Tom Cone Jr View Post
                    I suggest you spend some time working through the user's guide and playing with the default form for your table.
                    Hi Tom,

                    Where can I find the user's guide for such development? I would really like to make a design with my present requirements. If such techniques is meant for other development packages, how can I make that possible? What other development packages?

                    Aaron.

                    Comment


                      #11
                      Re: Using same table for textbox results and browses

                      User's Guide (Desktop)

                      Comment


                        #12
                        Re: Using same table for textbox results and browses

                        Aaron, I think you will need to create a Set using the Department and Speciality Tables for this to work properly. In the description you sent me, you mention a Link, but there is no set defined in the Database.
                        The [Dept_ID] could be the linking field and the order could be [Spec Id], however the two tables do not seem to have a logical link between them.
                        Is there a connection between Department and Speciality? I couldn't find an easily understandable relationship.
                        You can restrict the actions in the Browse, and even restrict its display if you want to.
                        As Tom suggests, read up on the User Guide and especially Sets and Browse controls.
                        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


                          #13
                          Re: Using same table for textbox results and browses

                          Hi Aaron,
                          I see that you defined a lookup field rule from the Department table for the Speciality table Dept_Id field. In that field rule there are options to edit and add records to the Department table. This will provide the same functionality you are trying to do with the form's combo box and the add and delete buttons. To enter a new record into the speciality table you can use the toolbar button above the form, lookup the Dept_ID and add the specialty and when the record it saved it will appear in the browse below. An OnChange event can be added to those fields above the table to automate the saving of the new record, then you can omit the other buttons. So rather than blank out existing records to add new values to the table, you add a new record.

                          I added a form using only the field rule lookup and messed a bit with the buttons on both forms. On your original form I kept the combo box but attached it to a variable defined as shared and added restrictions for Enter and Edit of records so the user must use the buttons on the form. That variable can then be used in a script to delete the current department from the department table - if that is what you still want to do. To make record changes, use the Edit button first.
                          Attached Files
                          Last edited by MoGrace; 01-15-2012, 01:20 PM.
                          Robin

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

                          Comment


                            #14
                            Re: Using same table for textbox results and browses

                            Robin,
                            You're example throws an error in my hands when opening your department form.

                            Aaron,
                            What you are wishing is possible, but not best achieved with how you are set up to try and achieve this. Having the Department Add form based on the Department table sure seems like it should be logical, but because of Alpha oddity, when starting with an empty table, you will always generate a blank record for the first table record. I have added a dummy table with one field. I used this table to generate a form for adding Departments. The form field is based on a form session variable. The value of that variable, when saved, is written directly to the Department table in the save button script of that form. This makes it available in the dept_id lookup. This avoids the first blank record being blank and any conflicts having to do with needing the form field to be blank when the add department form is opened, and the possibility of deleting existing records.

                            Secondly, your delete button for the specialty browse was only addressing the browse. The other fields also belong to the specialty record. I moved that from only addressing the browse to addressing the entire parent record. The edit button doesn't really offer anything in this setting. A cursor in a field would engage an Edit/Change.

                            That's about it, I think. Hope this helps
                            Attached Files
                            Mike W
                            __________________________
                            "I rebel in at least small things to express to the world that I have not completely surrendered"

                            Comment


                              #15
                              Re: Using same table for textbox results and browses

                              Hi Mike,
                              I don't know which form you were in since there are two. But the specialty form is the one where you must press the edit button first to make any changes. I think I allowed the combo box to always be modeless and that makes no sense if Edit is locked.
                              Robin

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

                              Comment

                              Working...
                              X