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

Linking field

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

    Linking field

    When I create a new record in say the customer table I am trying to simultaneously create a new record in a related table. During this twinned or two step record creation I am trying to take the primary key from the customer table and insert it in the related table.

    I can pass data using the onpageredirect feature to another dialog or grid component but the auto incremented primary key value is not created at this point. I tried this in a view but the same situation exists.
    At the point of entry the primary key does not yet exist so it can't yet be inserted in the related table.

    Is there a technique to easily accomplish this? I need to generate the customer record and then create the related record with the primary key from the first record. I am trying to allow the user to do this when he registers. This will be invisible to the user but the result will be that he is entered into two or more linked tables.

    Tks
    Bob

    "If at first you don't succeed try, try and try again!

    #2
    Re: Linking field

    Bob, you don't need to do any of that - Alpha has many ways of doing things - there is a lot of information about that is no longer required so stick with only recent release notes, there are many things Alpha V10.5+ does for you easily.

    If you have a table that has a field you want to use to crate a relationship with another field in another table, just ensure both fields are the same type and length, you can then simply create grid the holds the parent table, and a grid that holds the child (related table), you must select to include the fields that are to create the relationship in the grid (then hide them) - you must do this for both grids - you then open the parent grid and insert the child grid as a row expander, you create a filter between the two by matching the fields in the row expander builder, you must use the link option. When you run the parent grid and click the row expander + the related record will be empty - enter some data, save and you are done, the relationship is created by Alpha.
    Insanity: doing the same thing over and over again and expecting different results.
    Albert Einstein, (attributed)
    US (German-born) physicist (1879 - 1955)

    Comment


      #3
      Re: Linking field

      Thanks Pete

      Comment


        #4
        Re: Linking field

        Pete,

        I am trying to do the same thing there is an issue doing this for a grid, whether
        1-Tabular Type
        2-Form Columnar
        3-Stacked Columnar

        It does not work for "ADD ONLY RECORDS"

        If you have update/insert then yes but add only no.
        If so I would really like to know how to and what options I need checked or not! Been playing with this to long and have to move on to a different method if can not figure out thanks.
        :o
        Nicholas Wieland
        LedgerSuite.com Corp
        [email protected]
        http://www.ledgersuite.com

        Comment


          #5
          Re: Linking field

          Nic,
          All the video an emphasis in V10 is on linked content.
          There is not much on how to initially link the content.

          I am approaching this in a way that allows the linking to occur as the user enrolls in different aspects of the web app.

          I tried the row expander within an add only grid template and was also unsuccessful.

          Maybe Pete or some one else has additional info.
          Tks

          Comment


            #6
            Re: Linking field

            Bob,

            I am playing right now with a few different ways and will report back, but I do not think it is possible to do with an new add transaction.

            Will update, soon.
            Nicholas Wieland
            LedgerSuite.com Corp
            [email protected]
            http://www.ledgersuite.com

            Comment


              #7
              Re: Linking field

              Bob,

              I just found out from the top you can not do this on a "NEW RECORD".

              So I am going to do this. I just posted something in another post.
              I have created a grid that has no visible fields but plenty under the hood (hidden) they are prefilled. I have a document_type field which will be set to say "N" for new record. Once I hit start the process it will auto increment post all prefilled information and I will redirect to another page that has the grid parent - child records but I will filter on the parent for document_type="N" which will for me pull up the record and then I also have an autofill on the child grid which will also work.

              Not seeing a downside on this method yet?
              Nicholas Wieland
              LedgerSuite.com Corp
              [email protected]
              http://www.ledgersuite.com

              Comment


                #8
                Re: Linking field

                Thanks Nic,
                I will examine your technique. Maybe the top has some other suggestions as well.

                What is the other post?

                Comment


                  #9
                  Re: Linking field

                  It seems to me that the trick is saving the parent record and then retrieving it back to the browser. Then passing the data to the linked grid.

                  The problem seems to be that the parent record must be created and saved first. There is no auto incremented field to pass to the linked grid until this is complete. It can be done with the row expander when a parent already exists. In the case of a single record there is no parent yet to inherit from.

                  Can a domino affect be created, where the parent record is saved then retrieved and then the linked field is passed to the child field and it is then committed with the linking field filled.

                  Tks

                  Comment


                    #10
                    Re: Linking field

                    Is there a way to generate the auto incremented field when the browser opens with the add only grid.

                    The DBF default table browse in the control panel generates the auto increment number as soon as one of the other fields in the browse gains focus. How can this be brought through to the web Browser?

                    If this can be accomplished than the Auto incremented field would be available to pass to another child grid or dialog component.

                    If some of the Alpha legends could weigh in on this it would be appreciated.

                    Tks

                    If at first you don't succeed try, try and try again!

                    Comment


                      #11
                      Re: Linking field

                      One more shot. Can this be done with a Guid? Wouldn't that be generated before the record is committed? I could then pass the guid to the linked grid as the linking field.

                      Comment


                        #12
                        Re: Linking field

                        Bob,

                        Can not do on an add grid.

                        tbl = table.open("[PathAlias.ADB_Path]\recieptsheader")
                        tbl.enter_begin()
                        tbl.Growerid = currentform.controls.Growerid.value
                        tbl.Bol = currentform.controls.BOL.value
                        tbl.Usdf = currentform.Controls.Usdf.value
                        tbl.Time = now()
                        session.__protected__receipt = tbl.Id -this is an autoincrement field.

                        I have done this before and then write the session onaftervalidate but have not test this on mysql this was on DBF's
                        Nicholas Wieland
                        LedgerSuite.com Corp
                        [email protected]
                        http://www.ledgersuite.com

                        Comment


                          #13
                          Re: Linking field

                          Thanks Nic,
                          I will check it out.

                          Comment

                          Working...
                          X