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

Go to master based on child info

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

    Go to master based on child info

    I have a form (customers) that is based on a set that is based on tblcustomers and tblinvoices. Data about the customer is on the main form and data about each invoice for that customer is contained in an embedded browse on the form.

    I want the user to invoke an x-dialog box (from anywhere in the application and then enter an invoice number in a taxt field on the x-dialog.

    Upon leaving the x-dialog I want the "Customers" form to open and goto the customer record AND highlight the appropriate invoice record in the embedded browse.

    Any help would be most appreciated.

    Thanks

    Louis

    #2
    RE: Go to master based on child info

    Why not use the OnRowDblClick event of the browse? Musch quicker and easier for the user.

    kenn
    TYVM :) kenn

    Knowing what you can achieve will not become reality until you imagine and explore.

    Comment


      #3
      RE: Go to master based on child info

      In real life, a customer might (frequently does) call up and say " I have a question about my invoice.

      The user taking the call might be knee deep in another area of the application.

      I want the user to be able to press a hot key, type the invoice number and hit enter and be looking at the customer form with the desired invoice already highlighted.

      Louis

      Comment


        #4
        RE: Go to master based on child info

        Louis,

        I'd do the following:

        InvNo = ui_get_text("Invoice Number","Enter the invoice number.")

        Open Formname specially designed for this purpose, with index set for "invoice number") - Actually I'd reverse the set with Invoice 1:1 customer.

        f=form.load("Formname")
        f.index.set("InvoiceNumberIndex")
        f.find(InvNo)
        f.view()

        To be accessible anywhere, if you have room and a common menu bar, why not place it on the menu bar.

        Hope the above helps.

        Tom

        Comment


          #5
          RE: Go to master based on child info

          Ok, but how is the user going to know the invoice # if the customer doesn't have it?

          kenn
          TYVM :) kenn

          Knowing what you can achieve will not become reality until you imagine and explore.

          Comment


            #6
            RE: Go to master based on child info

            If the customer is calling with a question about the invoice they received, the are usually holding it in their hand.

            Comment


              #7
              RE: Go to master based on child info

              Tom,

              Thank you for your suggestion, I'll give it a go.

              Louis

              Comment


                #8
                RE: Go to master based on child info

                Louis,

                I like Tom P's approach, but I'd change the final line:

                f=form.load("Formname")
                f.index.set("InvoiceNumberIndex")
                f.find(InvNo)
                'f.view() 'I think this might open second instance of the form.
                f.show() 'since form is loaded, just show it.
                f.activate()

                - tom c

                Comment


                  #9
                  RE: Go to master based on child info

                  usuaslly....but what if they lost it or it got thrown away or they're too lazy to go and get it. Picking up the phone and calling is a chore for some folk.

                  If the browse shows all invoices for the customer (it's a much higher probability a customer knows their name), double clicking on the row containing the invoice in question is less work that typing an invoice number and risking "some" chance of a miss type.

                  Oh well.........

                  kenn
                  TYVM :) kenn

                  Knowing what you can achieve will not become reality until you imagine and explore.

                  Comment


                    #10
                    RE: Go to master based on child info

                    Ken,

                    Don't get me wrong, I truly appreciate your suggestions and you make alot of sense. I am trying to deliver specifically what the customer is asking for.

                    Realistically speaking, using your approach is a valid and likely solution. I have already implemented exactly what you suggested. However, what the customer wants, the customer gets, thus the need to navigate to the parent record based on the input of the invoice number.

                    Thanks again for your input.

                    Louis

                    Comment


                      #11
                      RE: Go to master based on child info

                      Hi Louis,

                      Yes, you are so right. My comment of "Oh well" was out of line, I apologize.

                      kenn
                      TYVM :) kenn

                      Knowing what you can achieve will not become reality until you imagine and explore.

                      Comment


                        #12
                        RE: Go to master based on child info

                        Ken

                        No offense taken...no apology necessary!

                        Louis

                        Comment


                          #13
                          RE: Go to master based on child info

                          Hello everyone,

                          I'd like to add a word in favor of Louis' original concept. After all, his user is accustomed to a particular form--header with embedded browse of individual invoices.

                          The proposed solution which is certainly practical takes the invoice number and does a find in an inverted set. But now the user will end up looking at a different form and what if he wants to review other invoices linked to the same client?

                          So if the user supplies us with the invoice number why don't we:
                          -use xbasic to look up which header it goes with;
                          -go to the invoice set (in which the header is parent);
                          -find the appropriate header;
                          -find the appropriate invoice in the embedded browse.

                          I don't see this a much more difficult than the alternative solution and it should appear more transparent and intuitive to the user.

                          Bill
                          Bill Hanigsberg

                          Comment


                            #14
                            RE: Go to master based on child info

                            Bill, Thank You!

                            Could you please offer some direction?

                            Louis

                            Comment


                              #15
                              RE: Go to master based on child info

                              Well better late than ever, here is an example.

                              Since you are starting out with the number of the child record you must first find the parent and then fetch the child.

                              This code is on the single button of the sole form in the example.

                              Bill

                              '--------------------------------------------------
                              dim shared vClient as C 'shared so the values persist until next time
                              dim shared vInv as C
                              if vInv = "" 'give the variable a value if the application was just opened
                              vInv="01"
                              end if

                              'Get the desired invoice number
                              vInv = ui_get_text("Find an invoice","Enter invoice to search for:",vInv,"")

                              'make sure it is valid
                              if .not.exist(vInv,"link","invoice_no")
                              ui_msg_box("Wazzmaddawidya","Invoice "+vInv+" doesn't exist.")
                              end if

                              'Find number of the parent record by looking it up in the link table
                              vClient = lookupc("f",vInv,"client_no","link","invoice_no")

                              'make sure client number is the form's active index
                              parentform.Index_Set("client_no")

                              'Find the parent record
                              parentform.find(vClient)

                              'Now find the child record
                              t=table.current(2)
                              t.fetch_loc_next(vInv,"Invoice_No")
                              parentform:browse1.Resynch()
                              parentform:browse1.activate()

                              end
                              Bill Hanigsberg

                              Comment

                              Working...
                              X