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

Find Record main record from the child table is not working for me

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

    #31
    Re: Find Record main record from the child table is not working for me

    First enjoy dinner, will catch tomorrow.

    Comment


      #32
      Re: Find Record main record from the child table is not working for me

      I had a feeling that the number of records is large and you need speed...

      You'll need to add indices and work the query to make sure that Lightening Query Optimization is used...

      Currently, you have

      query.filter = "(( Var->fColorHair $ colorhair ) ) .and. (( Var->fResideCity $ reside ) ) .and. (( Var->fSchoolKid $ kidslst ) )"


      why not

      query.filter = "(( Var->fColorHair = colorhair ) ) .and. (( Var->fResideCity = reside ) ) .and. (( Var->fSchoolKid $ kidslst ) )"

      or
      query.filter = "(( Var->fColorHair -"|" + Var->fResideCity = colorhair -"|" + reside) ) .and. (( Var->fSchoolKid $ kidslst ) )"



      Also I would add an indices to parents


      Code:
      Hair_City	                Colorhair-"|"+Reside	 	       Ascending	All	
      Index_Keywords_for_KIDSLST	KEYWORDSI(KIDSLST,VAR->EXCLUDED_WORDS) Ascending	All
      Use the full text search button to help build the last index.

      fulltext.PNG
      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


        #33
        Re: Find Record main record from the child table is not working for me

        Al - what is the purpose of using the '|' in the query filter? What does it do?
        Robin

        Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

        Comment


          #34
          Re: Find Record main record from the child table is not working for me

          Originally posted by MoGrace View Post
          Al - what is the purpose of using the '|' in the query filter? What does it do?
          It separates the fields so there is no cross over in case of multiple words... Probably not likely here, but is possible..

          Inconsistent results lessen the confidence in a system.

          Hopefully Mr. Data will fill us in on his results...
          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


            #35
            Re: Find Record main record from the child table is not working for me

            So that part of the query filter evaluates to "blonde-|London = colorhair-|reside" ? 'no cross over in case of multiple words' - you mean as in if RESIDE is 'New York' or COLORHAIR is 'light brown'?
            Robin

            Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

            Comment


              #36
              Re: Find Record main record from the child table is not working for me

              Originally posted by MoGrace View Post
              So that part of the query filter evaluates to "blonde-|London = colorhair-|reside" ? 'no cross over in case of multiple words' - you mean as in if RESIDE is 'New York' or COLORHAIR is 'light brown'?
              actually the minus sign won't show - it's used to truncate to the left and the concatenate the next string

              "blonde|London = colorhair|reside"


              It would also keep from building new words from the combination that don't exist individually

              ie "down|town"

              without the |

              could yield downtown

              which really isn't a choice from the individual fields.
              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


                #37
                Re: Find Record main record from the child table is not working for me

                In this case the choice of color hair is not part of the combination, as it is a fix choice.
                The reason for the use of combining text was to overcome the issue of finding records based on data from parent and child tables at the same time.
                The fields containing | are updated for every child entry. So the Parent table has the info form the kid table.

                Comment


                  #38
                  Re: Find Record main record from the child table is not working for me

                  Mike, where are you with this at the moment?
                  Do you have a resolution?
                  See our Hybrid Option here;
                  https://hybridapps.example-software.com/


                  Apologies to anyone I haven't managed to upset yet.
                  You are held in a queue and I will get to you soon.

                  Comment


                    #39
                    Re: Find Record main record from the child table is not working for me

                    Ted, no, I have not but I have improved it a bit. I am testing further.
                    I do appreciate, I really do, the help of you guys, but is not fair, to just ask and do nothing on this end.
                    Later I will post a sample of the improvement and see if I can get it perfect.

                    Comment


                      #40
                      Re: Find Record main record from the child table is not working for me

                      Another option, where you want to find "parent" record, based on a search in the "child" is to build a mapped table with the child table as the first table, and the parent table as the second table, and include what fields you need in each to correctly indentify both the child and the parent.

                      Open a second form based on the mapped table, and when the user finds the record they want, get the parent record record number, and when you close that form fetch the parent to that record number in tjhe original form.

                      I wrote one like this for a client, that searches dynamically on multiple fields - runs very fast, and the users like it

                      the search is like a drill down - search in one field, and then add to the search by maintaining the first query, and then adding to it by then searching on a second field, and then a 3rd

                      like child product first, parent state second, and then parent city
                      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


                        #41
                        Re: Find Record main record from the child table is not working for me

                        Martin, that's interesting. Any chance we can prevail upon you to post a sample? Thanks. -- tom

                        Comment


                          #42
                          Re: Find Record main record from the child table is not working for me

                          Me too!!!!
                          Attached is the latest, I have been able to make it it bit faster going from one record to the next. But still 7 to 8 seconds between records.
                          Of course in the sample is not noticeable, but in 100,000 records......

                          It will be great not to have to deal with combining the data from the child table into the master table.

                          Button 4 in the main menu is the latest.
                          Last edited by MikeData; 02-29-2012, 11:57 AM.

                          Comment


                            #43
                            Re: Find Record main record from the child table is not working for me

                            I did try to use mapped tables and I did not get it to work right, perhaps someone can tell what is wrong.
                            It looks that it should work and work much faster.
                            Attached is a new version with mapped table option in the main menu button 5

                            The mapped table is = newtblmapped
                            The new mapped form = NewSugMappedForm
                            the new mapped query = QueryFormappedTBL

                            Comment


                              #44
                              Re: Find Record main record from the child table is not working for me

                              Got it working Mike using the Mapped Table.
                              You don't have all of the necessary fields in the mapping.
                              What I did.
                              Created a mapped table using Parent and Kids.
                              Linked on Parent ID
                              Created a query - using the Genie on the default form created when you open the mapped table - run query and the correct options appear.
                              Next problem is that there are multiple occurrences of matching Parent ID. I suppose you plan to produce some sort of list to work from?

                              I will try the query in SQL as I'm learning SQL and have SFA to do at the moment.
                              Will let you know what happens.
                              See our Hybrid Option here;
                              https://hybridapps.example-software.com/


                              Apologies to anyone I haven't managed to upset yet.
                              You are held in a queue and I will get to you soon.

                              Comment


                                #45
                                Re: Find Record main record from the child table is not working for me

                                Mike, this SQL test returns the correct record info. It seems to be a bit easier than the hoops you are going through at present.

                                SELECT parents.Parent_Id,
                                parents.Name,
                                parents.ColHair,
                                parents.Reside,
                                kids.Parent_ID,
                                kids.Name,
                                kids.`Sch City`
                                FROM test.parents parents
                                JOIN
                                test.kids kids
                                ON (parents.Parent_Id = kids.Parent_ID)
                                WHERE (parents.ColHair = 'Blond') AND (parents.Reside = 'London')

                                I have also revisited the Tree Control and it seems that it's the easiest for the user as only the matching records are shown.
                                So if you are looking for people with Red Hair, the next node shows the only the selectable locations for red haired people.
                                Within the location node are the possible Schools , and within them, the parents.
                                The order is easily changed, so if you are looking for Hair Colour within Location, within Schools you just need to turn the tree upside down.
                                Last edited by Ted Giles; 03-02-2012, 05:47 AM.
                                See our Hybrid Option here;
                                https://hybridapps.example-software.com/


                                Apologies to anyone I haven't managed to upset yet.
                                You are held in a queue and I will get to you soon.

                                Comment

                                Working...
                                X