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

entering Parent and child record at the same time

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

    #16
    Re: entering Parent and child record at the same time

    Help me to understand, what would be your suggestion in this case. We are a sub-contractor so it gets a bit tricky.
    Our customer creates the PO based on what THEIR customer reports they are sending in to us. What we actually receive may be comepletely different than the PO. Therefor there are two fields (reported part number & actual part number). Now our core customers have a fixed list of parts so I need to be sure whatever is logged in for them is an exact match to the list. On the other side, the general customer can send us ANY part. How would you set this type of scenario up?

    Comment


      #17
      Re: entering Parent and child record at the same time

      You have lost me in the translation.
      Generally, to me , a customer Buys stuff from the supplier. As you describe;-
      Your are a sub-contractor (of what)
      Your customers SEND you (What)
      That may be different than the PO (Purchase orders are for what you are purchasing)

      I can only assume along the lines of;
      you get sent branded products to repair and your customers pre-empt what parts will be needed by sending you a PO.
      When the product arrives it may not be what they said or not need the parts they said.
      Once the terminology is clear we should have no problem assisting you with more concise suggestions.

      Comment


        #18
        Re: entering Parent and child record at the same time

        Apologies, I should clarify. We are a repair shop, with 2 core customers and a dozen general/internet/walk-in customers. We service a set list of products for the two main customers who issue a repair PO to us and send us the defective part for repair.
        One of these core customers works a bit differently: When an item is defective, THEIR customer orders a new one which the warehouse sends to them, and they send the defective to the warehouse. This warehouse then routes the defective to us for repair. The repaired item is sent back to the warehouse and stored as 'good' stock.

        So my biggest challenge is to set up a system that will separate out the items of these core customers from the general customers. The reason being that the core customers are given discounts which should not be applied to the parts of the general customer.

        Hope this helps!

        Comment


          #19
          Re: entering Parent and child record at the same time

          Looks to me like the discussion has drifted off topic. May I suggest that the design questions be reframed in the Database Design forum of this board? Thanks.

          Comment


            #20
            Re: entering Parent and child record at the same time

            Good point Tom. Should I repost this question in a new thread?

            Comment


              #21
              Re: entering Parent and child record at the same time

              Yes, thanks. Limiting each thread to a single topic helps the board serve as a better knowledge base.

              Comment


                #22
                Re: entering Parent and child record at the same time

                Going back to your post #4, I think I would create a new table. This table would contain the basic PO information, i.e. Company name etc. It would also contain your due date field. I would then create a new set, with your current tables as children. (Bear in mind that you can have as many sets as you like. Sometimes it's worth considering reversing the parent/child relationship, i.e. what we consider as the natural parent, might sometimes be better suited as a child).

                Now you can create a browse listing of your PO's, which on double-clicking on a row would open a form with several embedded browses - each embedded browse listing your current tables.

                The new browse above - listing your PO's - would have a column showing due dates. (I normally set up field conditions to colour due dates green, orange and red).

                Comment


                  #23
                  Re: entering Parent and child record at the same time

                  Thanks for all the input so far guys. I'm currently working with one main table capturing the basic PO information, and a child table containing only the customer specific fields as suggested. The issue is if someone is entering a PO then moves to enter data into the "custom" fields (in the child table) but decides to cancel the entry by hitting ESC, only the record in the child table is cancelled. So now there is a parent with missing details since there is no child record. Does this make sense?

                  Comment


                    #24
                    Re: entering Parent and child record at the same time

                    John there are many alternative strategies available.
                    You can do something pre new entry, like capture to variable or temp table for the master and only when a child is accepted, post it all.
                    Or choose to follow a POST process to remove a childless parent before leaving the record.

                    Comment


                      #25
                      Re: entering Parent and child record at the same time

                      ray could you help by giving an example of how to create a post process to remove the childless parent. I tried using "delete record" on cansave event but this doesn't always fire for some reason. Any other suggestion?

                      Comment


                        #26
                        Re: entering Parent and child record at the same time

                        I've never tried that - but I wouldn't expect it to work properly, deleting a record on cansave sounds contradictory.
                        If you haven't yet saved then try cancel() on the cansave

                        Comment


                          #27
                          Re: entering Parent and child record at the same time

                          I tried cancel, but it is essentially cancelling when user pressed ESC. The issue is it cancels at the child level only, the parent has already been created. I guess it has to create the parent before it can move into the child record, but can't think of a work around.

                          Comment


                            #28
                            Re: entering Parent and child record at the same time

                            Originally posted by hov333 View Post
                            ray could you help by giving an example of how to create a post process to remove the childless parent. I tried using "delete record" on cansave event but this doesn't always fire for some reason. Any other suggestion?
                            Regarding removing a parent with no child.
                            John this depends entirely on the design (Form with browse probably) , urgency (must it immediately be gone or appear gone), user activity etc
                            It would probably not be a good idea to remove the PO immediately without user option - they may still want to add item/s
                            Wouldn't a simple DELETE button do the job? It could check that no child exists.

                            Else have a maintenance routine, perhaps on opening the form, that checks for and removes childless records.

                            Ask "how to" based specifically how you want this to function.

                            Comment


                              #29
                              Re: entering Parent and child record at the same time

                              Getting back to post #1 you could use xdialog, but then you have to hand code it. The limitation w. xdialog is that it doesn't have a "browse' for multiple child records so you would need to create static rows using variables. So if you never enter more than 7 or 8 child records you might have to put in 10 "rows" as a safety. It's more work but it completely eliminates the problem you present. If you were using v11 or 12 you could use a dialog/ux web component on the desktop which is easier than xdialog to achieve the same result.
                              Peter
                              AlphaBase Solutions, LLC

                              [email protected]
                              https://www.alphabasesolutions.com


                              Comment


                                #30
                                Re: entering Parent and child record at the same time

                                Peter,

                                Edit: oops forgot to hit submit last night. <doh>

                                Hmmm,you got me thinking(plus it is late here and I have had some nice aussie red and a bit of port). How about going somewhere in between. You could do as you suggest with the xdialog variables for the parent record. Also add one set of variables for one child record just for entry purposes. Then add to the xdialog an embedded browse to display the multiple children. That way one could enter the parent info and one child info and then submit/commit that data. Only if there was data in the child fields would the data in the parent fields get saved. After the first child subsequent saves/commits of the parent data could be contingent on a flag or if there is a change in the data. There could also be a seperate form opened to edit the parent data if that data needed changing later on. To add more child records there would need to be a "Add record" button that would clear the child variable section ready for new input. Selecting an existing record in the accompanying embedded browse could populate the 'fields' in the child entry variables for editing.


                                Also, if a seperate process is used to assign the parent id linking field ( ie a homemade autoincrement value) that did not need to remain consecutive ( ie if a value was generated and then discarded leaving a gap in the sequence) Then more than one child could be entered before the whole shabang was saved.

                                Reading the whole thread again it seems like in this (John's) case there is only one child record ( that being for those special/extra fields for the two core customers).
                                If this is the case then an xdialog might be the way to go.
                                Tim Kiebert
                                Eagle Creek Citrus
                                A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                                Comment

                                Working...
                                X