10 Replies Latest reply on Feb 19, 2014 10:23 AM by Stephen Huston

    2 way linking for separation model

    petery009

      Hi everyone

       

      Does anyone experience 2 way linking ( File_data is External data souce of File_app, and File_app is External data souce of File_data ) ?

       

      i was working on an exsiting file, and want to make it a separation model, the problem is this , there's some conditional value list they use which needs some relationships.

       

      also some fields at field level to validate using those value lists.

       

      now it creates the problem that , if i put this relationship in front only which is the File_app, and delete the relationship at the File_data, the field can not valid based on the value list any more,

       

      then my coworker find a way that link the File_app as external data souce to File_data, and using the value list from File_app to valid the field at the back end File_data.

       

      but both of us have no idea about this 2 way linking is good practice or bad in somewhere waiting for us.

       

      Thanks for any advice !

       

       

      --Peter

        • 1. Re: 2 way linking for separation model
          robrickard

          Im still newer to Filemaker (i used it in the 90s, but recently picked it back up). I started to move all my solutions to a separation model where all the data is separated from the UI. I have all the UI (user interface) in one FM file and that file has no Data in it. This way i can update the UI without working on the working files. I have had no problems with value lists (other than sometiems i want them to do more than what is possible in FM). Almost all my scripts are in the UI file. And the Value List have to be in that file (if that is not true, im not sure how that would work). As long as the relationships are set up proper you should have no problems.

           

          My guess is that you have a lot of 'moving parts' in all both of the FM files. Unless it is required, i would go down the path i did and have one UI FM file with all the relationships, scripts and VL and then leave the DATA file for just the data.

          • 2. Re: 2 way linking for separation model
            petery009

            Thank you for sharing your experience.

             

            my main problem with this value list is : there's 3 tables involved, and finally we found out we can only put the value list in front end, then leave us some options to use to validate the field using value list.

             

            Option 1: using the script that whenever user modify the field check : PatternCount ( ValueListItems ( "File_App" ; "Value list name" ) ; field)

            Option 2: 2 way linking, then on the field level, validation by member of value list

            Option 3: i just discovered this sort of combined the idea of the above two, validation by calculation : PatternCount ( ValueListItems ( "File_App" ; "Value list name" ) ; field) > 0

             

            please share any other ways you have .

             

            Thanks!!

            • 3. Re: 2 way linking for separation model
              petery009

              Hi everyone

               

              we just too concern about this 2 way linking issue, if it will back fire on us some day which is we want to find out NOW !!

               

              Any ideas ?

               

               

              Thanks a lot !

              • 4. Re: 2 way linking for separation model
                Stephen Huston

                If you need the same dynamic value list in both files for both interface and field validation, you can create identically-defined value lists in both files.

                 

                As long as the lists are fully dynamic, there should be no problem with one of them going obsolete if they both rely on the same field contents in the data file.

                 

                Another option might be to script your field validation tests in the interface file using script triggers, thus avoiding validation within the field definition.

                • 5. Re: 2 way linking for separation model
                  robrickard

                  You can not share a valuelist to multipe files, but you can re-create it in all your files. As long as the relationships are the same they should work the same.

                  • 6. Re: 2 way linking for separation model
                    petery009

                    Thank you all for your replay.

                     

                    We try to make the back end (the data file) as clean as possible (less or no relationship) . so any solution for this value list issue is based on that concept.

                     

                     

                    Thanks!

                    • 7. Re: 2 way linking for separation model
                      wimdecorte

                      petery009 wrote:

                       

                       

                      we just too concern about this 2 way linking issue, if it will back fire on us some day which is we want to find out NOW !!

                       

                       

                       

                      Find out what?  What will "back fire"?  Reading through the thread I don't see what you are trying to achieve or what you are worried about.  Can you re-state the problem?

                      • 8. Re: 2 way linking for separation model
                        Stephen Huston

                        Scripted field validations can be done entirely in the interface file, leaving the data fields' definitions free of validation tests.

                        • 9. Re: 2 way linking for separation model
                          petery009

                          The problem : say we have a project , first thing we need to do is  the separation model for the existing file (one file) they have.

                           

                          >> due to complex relationship for conditional value list, we decide that we can only put the value list in front with all the relationships, but at field level, they need to validate the field by member of that value list.

                           

                          one of the solutions is this: link the File_App as external data souce of File_Data, so we can use the value list from File_App to validate the field

                           

                          we don't know if this File_App "link" File_Data is a good practice or not ? since we don't have that much experience.

                           

                          let me know if need more clarification.

                           

                           

                          Thanks!

                          • 10. Re: 2 way linking for separation model
                            Stephen Huston

                            I try to avoid any linking from the data file to the interface file in the data files table graph, as this makes the reliability of data dependant on the interface. This can backfire if one wants to update only the interface, but needs to change the field validation rule. Then one must update both files, which is one of the things I use the Separation Model to avoid needing to do.

                             

                            That's why I recommend scripting validation within the interface file rather than embedding validation rules to the data field definitions.