1 2 Previous Next 18 Replies Latest reply on Oct 25, 2008 3:53 PM by wig

    relationships and/or external data source

    wig

      Title

      relationships and/or external data source

      Post

      I have pro vs.9.. I have 3 files but the data within some of the fields need to be linked. For example, if I type in a customer name, in a "quote", I want my "client contact" file to open so I can add the contact / and visa versa...

       

      Is there an easy explanation? 

        • 1. Re: relationships and/or external data source
          TSGal

          wig:

           

          Thank you for your post.

           

          Your question is a little vague, but perhaps I can point you in the right direction.

           

          Assuming you have one field where you enter a name with a quote.  You can check for a quote and either display a message to add the record to another table, and/or include a script that switches you to another table/layout to enter the contact information.  I'm not quite sure what is meant by "vice versa"?

           

          Does this help?  If not, can you explain it a bit more?  Providing a real-life example also helps with the understanding.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: relationships and/or external data source
            wig
              

            Sorry for sounding vague...

             

            And yes,per your responce, when I enter a new name or "other" I want the other file to open so the data can be filled in complete... not sure if that's a script...

             

            Can you help? 

            • 3. Re: relationships and/or external data source
              TSGal

              wig:

               

              Thanks for the clarification.

               

              FileMaker cannot automatically switch to another table.  There are FileMaker Pro plug-ins you can purchase from third-party vendors that can do this function.

               

              What you can do is create a script, and then have a button next to the field that executes that script.

               

              The following script can be modified to fit your needs:

               

              If [Left (<field>, 1) <> "\""\

                 Exit Script []

              End If

              Set Variable [$var; Value: Middle (<field>, 2, length (<field>) - 2)]

              Go to Layout [that shows information from other table]

              New Record/Request

              Set Field [<new field>; $var]

               

               

              In essence, this script looks to make sure a quote is the first character.  If it isn't, then we exit the script.

               

              If the first character is a quote, then we copy the content between the quotes to a variable ($var), switch to a layout that references fields from the other table, creates a new record and set one of the new fields to the value from the variable.  The script ends while you are in browse mode entering a new record.

               

              This should get you started.

               

              Let me know if you need clarification for any of the above steps.

               

              TSGal

              FileMaker, Inc. 

              • 4. Re: relationships and/or external data source
                wig
                  

                seems to make sence...

                 

                But just to be sure I'm getting it...

                 

                I copy it exactly the way you have it written (minus the smile... :>)

                To make the button associate with this script what do I do?

                And, when filling the out the form, Do I hit the button every time? or just when it's a new entry?

                • 5. Re: relationships and/or external data source
                  wig
                     I'm trying to put it in as you wrote and I keep getting an error pop up that something is missing? 
                  • 6. Re: relationships and/or external data source
                    TSGal

                    wig:

                     

                    Oops!  I noticed a problem with the first line in my script where the trailing \ should be removed.

                     

                    Also, the Set Variable step came out incorrectly, because the closing parentheses was replaced with the smiley face.  I adjusted the script (spaced it out more) so you could see the formula

                     

                    Substitute the name of the layout in the "Go to Layout []" step.

                     

                    Here it is... 

                     

                    If [Left (<field>, 1) <> "\""

                       Exit Script []

                    End If

                    Set Variable [$var; Value: Middle (<field> ; 2 ; length ( <field> ) - 2) ]

                    Go to Layout [that shows information from other table]

                    New Record/Request

                    Set Field [<new field>; $var]

                     

                     

                    TSGal

                    FileMaker, Inc. 

                     

                    • 7. Re: relationships and/or external data source
                      wig
                        

                      I tried again and this is what pops up....

                       

                      a number, text constant, field name or "(" is expected here

                       

                      it doesn't allow me to cut and paste your message...  

                      • 8. Re: relationships and/or external data source
                        TSGal

                        Which calculation is this for?  Is this for the If[] formula?  The Set Variable?

                         

                        What scripts steps do you have set up so far? 

                         

                        TSGal

                        FileMaker, Inc. 

                        • 9. Re: relationships and/or external data source
                          wig
                             I can't even get the first line in...
                          • 10. Re: relationships and/or external data source
                            TSGal

                            wig:

                             

                            For the first line, once you have selected "If", click "Specify", and that will take you to "Specify Calculation".

                             

                            From the functions on the right side, scroll down and double-click "Left ( text ; numberOfCharacters)"

                             

                            Highlight "text", and from the field names on the left side, double click on the field where you will enter the quotes.

                             

                            Next, highlight "numberOfCharacters" and enter 1.

                             

                            Click "OK", and the script step should be entered.

                             

                            Let me know if you have difficulty with any of the other script steps.

                             

                            TSGal

                            FileMaker, Inc. 

                            • 11. Re: relationships and/or external data source
                              wig
                                 Ok I got the first part in.... but yes I need the Scripts for Dummy's directions onn the second half...  :>
                              • 12. Re: relationships and/or external data source
                                TSGal

                                wig:

                                 

                                Glad you were able to get the first line entered.

                                 

                                I'm assuming you don't have a problem with the next two lines:

                                 

                                Exit Script []

                                End If

                                 

                                The next line is the Set Variable [] script step.

                                 

                                When you select "Set Variable", click on "Specify".  In the next window, there will be three lines.  In the top line, Name, enter: $var

                                 

                                On the second line Value, click "Specify".  You are now brought to the calculation area.

                                 

                                From the functions on the right side, find "Middle" and double-click on it, so it appears in the lower half.

                                 

                                Highlight the word "text", and from the field names above, double-click the field that has the quotes in it, and it will replace "text" with that field name.

                                 

                                Highlight "start" and enter the number 2.

                                 

                                Highlight "numberOfCharacters", and from the right side functions, find "Length" and double click on it.  "text" should automatically be highlighted, so from the fields above, double-click the same field that contains the quotes.

                                 

                                Put your cursor between the last two closing parentheses, and enter a hyphen (minus sign) followed by the number 2.  Your formula should look similar to:

                                 

                                Middle ( <field name> ; 2 ; Length (<field name>) - 2 )

                                 

                                Click OK, and you should be fine.

                                 

                                Let me know if you have difficulty with any of the remaining script steps.

                                 

                                TSGal

                                FileMaker, Inc. 

                                • 13. Re: relationships and/or external data source
                                  wig
                                     Ok that worked as well... now when I put GO TO LAYOUT ,, it only gives me under (specify) original layout or the other layouts within this file. Going to another file isn't an option?
                                  • 14. Re: relationships and/or external data source
                                    wig
                                      

                                    TSGal,

                                     

                                    additonally, I'm not sure if what your helping with will solve the following...

                                     

                                    Within the same 3 files. I already have some clients and vendors listed...

                                    Why when I enter the name, from the drop down, does it not populate all the known data from that client? What it does is continue with drop downs in the other fields??

                                     

                                     

                                    1 2 Previous Next