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

Master detail updates

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

    Master detail updates

    I have a master detail set Customer and Activity linked by a field called CustSeq (One to Many relationship)
    I created a form with all the fields in the set. There is a browse object of the child table
    on the form. I created another form called Activities. A button which runs "Open form or browse layout " action script with the "Enter new record" option. The problem is that it does not honor the master detail relationship. (It enters a new record in the activities table but not with the current Custseq number).Although when entering a new record on the browse object it enters the current master CustSeq number. I tried another method by adding the following action scripts to a button:
    1. Enter new record
    2. Save record.
    3. Zoom to record.

    But this adds a new record to the Customer table as well as the activities table.
    Can anybody explain what I am doing wrong.

    #2
    RE: Master detail updates

    Peter

    When the form is based on the set, the master detail relationship is known and both tables are available.

    When you made a form called activities, I guessing that you made it based on the table activities - not the set. So if you open that form and add records, all it knows about is the one table - activites.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.
    "Make it as simple as possible, but not simpler."
    Albert Einstein

    http://www.iadn.com/images/media/iadn_member.png

    Comment


      #3
      RE: Master detail updates

      Peter,

      Al is correct. Since you are opening a separate form to enter the activities you will need additional code to accomplish your task. I am doing something similar. I have a set based form where I show the child table in an embedded browse. My embedded browse is read only because I do not want new records entered into the child table via the embedded browse.

      On my add new record button for the second form, I have taken the value from the linking id field on my set based form and assigned it to a variable. When I open my new form, I assign the variable value to the child table record. On my new form I also have a button to allow them to add new records to that current specimen since I am not allowing continuous enters. This add new record button also needs to populate the linking id field, again using the value in the variable.

      If you allow the new records to be added via the embedded browse on your set based form, you do not need to populate the linking id field as it is automatic with Alpha.

      Hope that helps.

      Good luck.
      Cheryl
      Cheryl
      #1 Designs By Pagecrazy
      http://pagecrazy.com/

      Comment


        #4
        RE: Master detail updates

        Cheryl

        I tried this approach but I am still not there.
        OK... same scenario as above (Both forms based on the set).
        I populated the add button with the following scripts:
        1.Get value property of object (Storing it in a
        variable which is globaly available )
        2.Open form of Browse layout with the "Enter new record
        option"
        3.Set value property of field(s)this is where I get stuck.
        when selecting the "Another form or browse window", the activities form is not available for selection. It says only current open windows are listed.

        Would it possible for you just to provide me with a small code segment so that I can see how you achived the above.
        Kind regards,
        Peter

        Comment


          #5
          RE: Master detail updates

          if both forms are based on the same set, and you are entering a record to a child table, you first have to fetch the correct parent on the 2nd form, so it adds the child to the correct parent - if you are doing it this way, then it will automatically assign the linking field to the child.

          usually, though you do something like this:
          create a form based on the child table only
          from the main form, (based on the set,)
          say the key field is "customernumber", and that field is displayed on the main form

          f=form.load("childtableformname")
          f.new_record()
          f.customernumber.value=parentform:customernumber.value
          f.show()
          f.activate()

          you have now begun the entry of a new record on the 2nd form, and have preentered the linking field - note though, that if you let them enter more than one record while they are there, you will have to adopt a method like Cheryl is using.

          I often use different forms for viewing/editing child tables and for entering new records, and turn off navigation for the new records-form, and when they save the record, close the form and bring them back

          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


            #6
            RE: Master detail updates

            "3.Set value property of field(s)this is where I get stuck.
            when selecting the "Another form or browse window", the activities form is not available for selection. It says only current open windows are listed. " - so open the activities form before you start editing the "master" form. You can open both and minimize the activities form while you are making the action script choices. It should then be available when making your final selection.
            There can be only one.

            Comment


              #7
              RE: Master detail updates

              Just a word of thanks to everyone that help to make this forum as vibrant and helpful as it is right no.....Thanks a million you guys.

              Peter

              Comment


                #8
                RE: Master detail updates

                Martin

                I used the your code as suggested. It worked fine. But when I tried it again on another master / detail, it incremented the master "customernumber" before inserting it in the detail "customernumber" . It does not take the current "customernumber". Although the set is configured correctly as far as I know "One-to-many" and both forms are based on the set.

                Many thanks

                Peter

                Comment

                Working...
                X