11 Replies Latest reply on Oct 22, 2015 8:05 AM by adim

    found records between files

    adim

      Hello, I have a main database file with records and a second file that show the same records via a ralational link 1=1.

      I would like to be able to make a selection of records in the main file then go to the second file where I can work on the same selection of records.

      I can do the reverse using the go to related records in the found set but not from main to second... Any ideas?

       

      Thank you for your help

       

      Alex

        • 1. Re: found records between files
          wimdecorte

          GTRR should still work provided you have a valid relationship between the two contexts...

          • 2. Re: found records between files
            adim

            Thank you for your help but GTRR does not seem to work the other way around... I think the main problem is that the main file does not see the layout of the second file when I set up the GTRR.

             

            They both have a relationship 1=1 global field, to each other

            • 3. Re: found records between files
              sreese

              I believe that found record sets do not carry over between files. You would need to perform the find again in the other file to restrict your results. Then you could use GTRR to switch back and fourth.

               

              I don't know how complex that found set it to know a good way to tell you to perform it on both files. -_-

              • 4. Re: found records between files
                adim

                Thank you... The GTRR works from the second file, which is empty and show only the records from the related main file: for example: if I make a search and find 5 records, then click on a button which takes me to the main file (which contains the actual records) and shows only those 5 records.

                 

                To repeat the main file contains the records and the second file is actually empty and had a table with an always_1 field that is used to relate to the main file's always_1 field.

                 

                I am doing this to be able to have reports in a separate file so that I can upgrade the main file without affecting the reports.

                 

                The main file is where the user navigates and makes selections... It would be too complex to have to redo the searches in the second file when a report is needed.

                 

                Alex

                • 5. Re: found records between files
                  sreese

                  Alex,

                   

                  I am working to understand your problem as I clearly misunderstood what you were saying in the first post.

                   

                  You are working to move your reports to a second file.

                  In this second file you have a table that contains only a global variable.

                  You can use GTRR to go from the second file to the first file, but not the other way around.

                   

                  Here are my assumptions:

                  That 1 global field is a key that relates to multiple records on the other table.

                  You have the same relationship set up in both files relationship graphs.

                   

                  If my assumptions are true, you could write a script that requires a parameter. This parameter would be the value for the global field. You set it in the script that runs from the second file and it should accomplish what you are trying to do. If not then I'm not sure.

                  • 6. Re: found records between files
                    adim

                    Hello SREESE

                     

                    I'm not sure I follow...

                    Main (A) file contains a database with clients with many fields + a global field that is always 1

                    second (B) file contains just a table with one global field that is always 1

                    the two files are in a relationship with the always 1 field (A) = always 1 field (B)

                     

                    In the B file I have a layout X that show all the fields and records from the A file

                     

                    I would like to make a selection of records in the A file, then go to the B file and have the same selection show in the layout X

                     

                    If I do the reverse i.e. making the selection in the B file and then GTRR to the A file, the selection is retained in the A file, but that is not what I want to do

                    If I do a GTRR from the A file to the B file the selection is not there.

                     

                    Am I making sense?

                     

                    Alex

                    • 7. Re: found records between files
                      wimdecorte

                      adim wrote:

                       

                       

                      Main (A) file contains a database with clients with many fields + a global field that is always 1

                      second (B) file contains just a table with one global field that is always 1

                      the two files are in a relationship with the always 1 field (A) = always 1 field (B)

                       

                      I think this is new information that we did not have before.  A relationship between two global fields will not work and that should not be how you set up the relationship to match records from A to B.  Make the relationship between primary key in A to same ID field in B and everything should work like you expect.

                      • 8. Re: found records between files
                        sreese

                        Wimdecorte, I thought this is what he had meant, however I wasn't sure so that is why I asked if my presuppositions were correct.

                         

                        Alex,

                        How are you displaying the records? Through a portal?

                         

                        If you want to pick and choose a found set I can see a couple ways that you can make it work. You could do what wimdecorte wrote and go that route.

                         

                        Or you could change your global field to a normal field. Then in your script mark all of the found records with the 1. This will only show your found record set in the second file. Then when you return to your original file you would want to clear those 1s out as a part of that script so they aren't there permanently.

                         

                        It really depends on your data and as I'm not certain the structure I don't know which route would be best.

                        • 9. Re: found records between files
                          adim

                          The A file is the only one to contain data

                          The B file is literally empty except for a table with an Always_1 global field to allow for the relationship with the A file.

                           

                          Everything you see in the B file is coming thru the relationship from the A file

                           

                          I would like to have a search (any search, like a simple last name or city search search, to complex ones) done in the A file, to be reflected in the B file, so that it would show the exact same records

                          The reason for this is to keep reports separate from the data.

                           

                          As I said before: if I do a search in the B file and then GTRR to the A file, I get the same selection of records in both files.

                          On the other hand, if I do a search in the A file (the one that actually contains the data), GTRR does not work and I cannot get the same selection.

                           

                          Alex

                          • 10. Re: found records between files
                            wimdecorte

                            adim wrote:

                             

                            On the other hand, if I do a search in the A file (the one that actually contains the data), GTRR does not work and I cannot get the same selection.

                             

                             

                            It should work, what error do you get when you try it and run it debugger?

                             

                            I think either the relationship from A to B is not correct or the options set in the GTRR script step are not correct.  Can you post a screenshot of both of the relationship and the script step?

                            • 11. Re: found records between files
                              adim

                              this is the relationship (both fields are global)

                              Screen Shot 2015-10-22 at 15.57.43.png

                              this is the script from B (walkabout) to A (mailing list)

                              Screen Shot 2015-10-22 at 15.59.05.png

                              the script from A to B does not let me enter a layout so i tell it to use layout 2

                              Screen Shot 2015-10-22 at 16.02.48.png

                               

                              and this is the error I get

                              Screen Shot 2015-10-22 at 16.03.15.png

                               

                              Thank you form your help