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

Insert a record in browse

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

    Insert a record in browse

    Hi,

    I have a master table and client table for eg., header and line items as a set
    header table
    |------------------> line items table (one-to-many)

    Inside a form, I am have line items table as a browse. Now for eg., I have 10 records.

    record no item no
    1 pencil
    2 pen
    3 stylo pen
    4 eraser
    5 ruler
    6 3b pencil
    7 fountain pen
    8 micro-tip pencil
    9 marker
    10 permanent marker

    Now I want to insert a new record at position 6, is it possible? Coz., currently the browse object allows to me to add at the end, which is ok to append record, but I want to insert a record in-between.

    Is there any way to acheive this? I am really a newbie to the Alpha 5 World...

    Thanks and Regards,
    Mahesh.

    #2
    Re: Insert a record in browse

    Not easily. Usually it's not necessary. Generally, the sort sequence is irrelevant for linked records in the child table. One approach that can achieve this, with a bit of effort, is to include a field in each child table record that holds a "position" number. The user supplies the desired position number when entering a new record to the browse. A script runs to renumber all the following records. This is probably not the first thing you want to tackle with Alpha Five.

    Why do you want to be able to do this?

    Comment


      #3
      Re: Insert a record in browse

      Tom:
      In Quicken Books when doing Invoices or Estimates, I have found that order of items listed is important (in landscaping the hard scape work comes first followed by plants and completed with mulch, sod, etc.). Sometimes something is left out when making up an estimate or invoice. Quicken Books has a right click or button (can't remember which right now) that allows inserting a line item between items.
      "Ollie, remember how dumb I used to be? Well, I'm much better now."

      Pete

      Comment


        #4
        Re: Insert a record in browse

        Right. I can think of a few other cases, too. But I daresay they're the exception. Most collections of child table records in an Alpha Five databases can be quick-sorted to achieve the desired sort sequence, regardless of the physical order in which the records are entered.

        The need to insert a row implies that quick-sorting isn't supported or available. To me it's using a relational database as a word processor. You can do it, with a bit of work, but it's not generally necessary. -- tom

        Comment


          #5
          Re: Insert a record in browse

          Tom,

          I think the problem is you are thinking of sorting when in actuality this scenario occurs regularly when ordering records in a specific way to produce either a list or a proposal---like you said a "word processing" feature, but when the order is something that produces a meaningful view then it is appropriate I think whether viewing from a database or a word processor.

          IOW, I believe that just because a word processor is used for this task for most things simply because that is what it was designed to do, doesn't mean that a database should not also have some of the same capabilities when it makes the data presented more meaningful and in some cases even to the point that if this type of ordering was not present the database would not be very effective.

          A case in point is a delivery route. Entered into a database not in any particular order simply because the order will change several times each year or even more often. No sort I know of will accommodate this, but an ordering scheme will.

          I hope this is taken as I am giving it....as simply presenting a different viewpoint regarding this. :)
          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


            #6
            Re: Insert a record in browse

            Mike, I don't disagree. In general my work goes better when I use the right tool for the job. When I get to the point that I'm embedding specific "positional" field values in each record.... that serve no purpose but to order the records in a particular way, I begin to ask myself if I'm using the right tool.

            I'm not saying this should never be done. However, I think it's appropriate to raise a warning flag when someone who is new to Alpha 5 begins to swim in the deep end of the pool. I've said twice already that inserting a row can be done, but not easily. No one has disagreed with me yet. Am I overlooking an easy way to do this? -- tom

            Comment


              #7
              Re: Insert a record in browse

              Hi Tom.

              I don't know how easy it is but this recent thread certainly goes about it different than what I have done in the past with much less script!

              http://msgboard.alphasoftware.com/al...ad.php?t=74732

              I downloaded the latest sample and sure seems to work for the most part--more error trapping needed but a very good start for someone to base an ordering scheme on.
              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


                #8
                Re: Insert a record in browse

                Hi,

                Yes, eventhough I have put the example as a simple one......but business requirements are quiet different.

                People who come from the excel world, wants the flexibility to insert a record where ever they want, coz it is very easy for them to go in order for certain reasons.

                I understand that I am a newbie to Alpha 5 but not to the IT or the database world. Definitely in certain cases the order in which the record is present becomes very important. Thanks to trackmanpete.

                Infact when I was searching, the same issue has been told to Alpha in their version 4 and 5...but somehow they have not yet implemented this feature....might be one for the future versions...I feel that this is very easy when Alpha takes care of it....instead we take care of this through coding.

                Thanks to MikeC, yes I am going through the code..unfortunately I am new to Xbasic....but I am sure I will pick it up over the period of time....and definitely the code is working for insert, but there are certain refresh problems while doing the delete.....But I think that is the only way I can implement this feature....

                I will give a try changing all the table names and other hard coding......

                Thanks and Regards,
                Mahesh.

                Comment


                  #9
                  Re: Insert a record in browse

                  Hi,

                  Finally I succeeded in doing the insert as I wanted.

                  Thanks to Tom baker, MikeC and others in the other thread who has helped me to acheive this.

                  Thanks and Regards,
                  Mahesh.

                  Comment


                    #10
                    Re: Insert a record in browse

                    Hi Mahesh,

                    We are all pleased that you have got the code to work the way you want.

                    Would you like to share the code with us.

                    This could be useful to someone else at some future time.
                    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


                      #11
                      Re: Insert a record in browse

                      Hi,

                      I took the code from the following thread.

                      http://msgboard.alphasoftware.com/al...ad.php?t=74732

                      I took the code from the insert_rev.zip and then added the following which was also mentioned in that thread

                      'refresh the browse
                      brs.activate()
                      if vLineN="01" then
                      sys_send_keys("{up}")
                      end if
                      brs.refresh()

                      only change i made was instead of {up} i used {UP}, coz., small case was not working in my version.

                      Hope this helps!!

                      Thanks and Regards,
                      Mahesh.

                      Comment


                        #12
                        Re: Insert a record in browse

                        I am glad that code worked for you. Just wondering what you did (if anything) about it deleting the wrong line as described in the previous post. I've done a little more work to it and used the .fetch_goto() command and fixed that problem. It still doesn't land on the correct row on delete but otherwise works correctly - I think. Attached is my updated database.

                        Hope this helps.
                        Dan
                        - Dan Hooley
                        - Custom Desktop or Web database development -

                        Comment

                        Working...
                        X