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

Auto fill from lookup from parent form

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

    Auto fill from lookup from parent form

    My request is very similar to this thread.

    http://msgboard.alphasoftware.com/al...112#post494112

    The original request seems it was not fulfilled.
    I have examine sample from Tom, posted in that tread, I am posting it back over here.
    I am in the situation that I must have some data from the parent form, Just like it in that sample.
    I can not have a button to enter a new record because I will not be at the computer I will be with a wireless scanner clicking and not using the keyboard.
    I did tried using a coded lookup at the c_id and it does not bring the parents name info upon creating a child record.
    I did try to incorporate scripting just like the button sample on the form, with time events like fetch, on entry, and on exit. It did not work.
    I am trying to execute that calculation at the table/set level.
    Any other solutions without xbasic?
    IS the only choice with xbasic?
    Attached Files

    #2
    Re: Auto fill from lookup from parent form

    Hi Mike,

    What wireless scanner will you be using?

    From what I can understand, a good scanner will handle all the data inputs and lookups, when it downloads, the tables simply get appended.
    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


      #3
      Re: Auto fill from lookup from parent form

      Thanks for the response Keith, The scanner to use is the wws500 wireless bluetooth from wasp. My issues are not with the scanning. That area is perfect.
      AS I mentioned above, the issue is how to bring some data from the parent table to the child table. It does not have to appear when the child record is created, but by the time the barcode clicks and moves to a new record I need some data from the parent table saved along with that record.
      The linking field is added automatically.
      why is so difficult to bring a related data?

      Comment


        #4
        Re: Auto fill from lookup from parent form

        Hi Mike,

        If you say the Linking Field is added automatically, what more do you want in the child table?

        Looking down to David's post, how do you create a new Parent record? How programable is is the scanner?
        Last edited by Keith Hubert; 04-25-2009, 08:41 AM.
        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


          #5
          Re: Auto fill from lookup from parent form

          Hey Mike,

          The trouble is trying to figure out how your using the scanner with the app.

          Originally posted by MikeData View Post
          by the time the barcode clicks and moves to a new record I need some data from the parent table saved along with that record.
          I take it from this that when you scan your app automatically moves to a new record? If that's the case, then how this happen?

          When you scan, your app is running, a form is open, and your cursor is sitting in a blank field - is this right? You scan, the scanned information is put into the field and then what? Does the scanner put in a tab, enter key, nothing? Scanners can be programmed, so how does yours work?

          Could you explain, step by step, how the app behaves when you scan?

          Comment


            #6
            Re: Auto fill from lookup from parent form

            Just like the sample submitted if you only have one field to add data in the browse, as you press return it moves down to the new record.
            The sample submitted is not the app using the scanner. The objective here is just like sample. One I enter a kid and move to to the next record, I need the PLname & PFname to be brought into the record. Tom added a button to do this. I need this action without the use of a button.
            If you look at the sample the form is a parent table and a browse. Adding a child and moving to the next record is automatic.
            The scanner at this point is irrelevant because it acts as a keyboard giving data and CarReturn at the same time. Since the reading of the barcode is the only field to access in the browse, automatically it moves to next record upon data entry.
            Last edited by MikeData; 04-25-2009, 08:38 AM.

            Comment


              #7
              Re: Auto fill from lookup from parent form

              Yes, I looked at the sample... it's very straight forward... and I understand you're not using the button, but rather a scanner. So... is the form open and on a field waiting for a scan? What's the field the cursor is sitting in?

              Is the parent form sitting in a new record?
              Is the scan supposed to look up a parent record?

              Let's say you've got this working... you scan, the names are written to a new child record... what happens then? Move to a new parent record, stay on the same parent record? Move the cursor back to the scan field?

              Comment


                #8
                Re: Auto fill from lookup from parent form

                The scanner will sit in a field called barcode.
                The similaity to above sample is the CLNAME in the browse.
                The scanning or keyboard entry is the same.
                How to add the parents names in the chiild record is the objective.
                I know is redundant. in the sample above. Not in my application.
                I have to find the way to add that redundancy.
                Sorry if I can explain it better.
                Some day we will have a forum with voice. That will be great.

                Comment


                  #9
                  Re: Auto fill from lookup from parent form

                  I miss part of the question. Yes I must add a bunch of kids to the parent record.
                  These are very prolific parents

                  Comment


                    #10
                    Re: Auto fill from lookup from parent form

                    It seems that I have confused the objective by mentioning "scanner". Lets forget about the scanner.
                    I am posting the sample again. Just add a new kid to the washington family.
                    It does not bring the parents names.
                    If you use the button, it does.
                    I need to add a kid and bring the family name to the kid record and not use the button.

                    Comment


                      #11
                      Re: Auto fill from lookup from parent form

                      Well, it's important to know that the scanner is involved. Attached is the database with a new field in the form... Barcode. There are action scripts attached to the OnChange event. They add a new record, put in the parent names and then set focus back to the Barcode field.

                      I find that setting focus back to the Barcode field doesn't work. But, I put a script on the Parent L Name field to set focus back to the field that previously had focus. This should probably be set directly, instead of just the previous field - it may not matter.

                      I also reset the tab order so that Barcode is first that gets focus. Now, when you scan - if the scanner also does a enter, or tab, then the OnChange event will fire.

                      Comment


                        #12
                        Re: Auto fill from lookup from parent form

                        Mike,
                        Not sure if this would work with a scanner, but works with the browse. Placed this in the children's field rules CanSaveRecord event.
                        Code:
                        dim t as p
                        dim vCID as n
                        dim t2 as p
                        dim vPID as n
                        t = table.current()
                        vCID = t.C_ID
                        t2 = table.open("parents")
                        t2.index_primary_put("Fam_Id")
                        t2.fetch_find(vCID)
                        t.P_F_NAME = t2.P_f_name
                        t.P_L_NAME = t2.P_l_name
                        t2.close()
                        In the browse (form2), I changed to parent name columns to show the parent data instead of the child data and made them read only. They automatically show when adding a new record.
                        Ernie

                        LATER: Just leave the browse as you have it and move this code to the Field Rules OnEnterRecord event.
                        Last edited by enstorms; 04-25-2009, 10:34 AM.

                        Comment


                          #13
                          Re: Auto fill from lookup from parent form

                          David thanks for taking the time. That field does the same as the button. Adding that bar code field in the top form does not help me. The barcode field is in the browse.
                          The parents are entered manually. The child is barcoded. The reason I said bardcode is irrelevant is because the objective is to enter a kids name in the CLNAME in the browse. Using scanner or by typing.

                          The top form has all the data is needed.
                          Ignore the use of the barcode. Just type a kid name in the browse CLNAME, press enter and you will go to the next record. The parentname field in the browse should include the data from the top form. Just like your accomplish in the bar field.
                          It is redundant. I need to have that redundancy. I need the code just like you did in the barcode field applied some how to the browse or to the CLName field.
                          The child sample posted is more specific with the tabs.

                          Comment


                            #14
                            Re: Auto fill from lookup from parent form

                            Ernie that was perfect. Thanks, Thanks.
                            Nice way to show the parent rec in the browse.

                            It works with barcode scanners because barcode scanners are nothing more than a keyboard wedge. Today must scanners have the option to not only bring the data reading but issue LF and CR They are optional/Programmable.

                            The code used is a complicated syntax for people who are not good with xbasic. It gave new insight to Alpha.
                            One more lesson in lookups schemes. I think I have them all, (Well maybe, until the next one).



                            I regret mentioning the scanner since it push people toward a more complicated task that it was. I did mentioned in order to explain why I could not use the button in the sample.
                            Thanks again to all.

                            Comment

                            Working...
                            X