5 Replies Latest reply on Mar 27, 2017 8:00 AM by philmodjunk

    relation problem




      I have a table players, and a related table for the settings, where players get the season from


      players_getseason ---- settings_season


      the players_getseason is a formula field which says "settings_season"


      This relation works as it should, so if the user changes the season he wants to work on, the payers_getseason field changes.



      Now I have a third table for the different teams. So I have:



      players_getseason ------ settings_season






      Unfortunately, my portal showing data of the teams table is not updating. If I manage my database and go back to browsing then the portal shows the correct data.


      Why is this?


      P.S. Would it be great if we had a diagram painting add in this forum in order to draw the relations?!?!

        • 1. Re: relation problem

          Been using text to draw relationships for years in these forums, but you can also do screen captures of your relationship graph and use the picture tool in the tool bar to insert it into your reply.


          If you are going to ask about relationships, you need to tell us the match fields used, names, data types, storage options and how they get values.


          Players_getSeason>----Settings_Season    (>---- means "many to one" )

          players_getSeason::_fkSeasonID = Settings_Season::__pkSeasonID


          is one way. _fk is my naming convention for foreign key fields and __pk is for Primary keys. The leading underscores sort the field names to the beginning of alphabetized lists of fields, but feel free to name the as you see fit as long as you let us know which fields get unique auto entered values (__pk) and which do not.


          Context is also critical. When you say that you have a "portal to the teams table", I can guess that in portal set up, it probably shows "teams_Season" in the show related records drop down, but I'm guessing and could be guessing wrong. And I'd also need to know what table occurrence is specified in layout setup | Show Records from so that we can look at the relationship between the two.


          (A "table occurrence" is what we call the "box" in a FileMaker Relationship graph. It isn't a table and it isn't a layout, it's a reference to one of your tables and there can be more than one that refer to the same table in your solution.

          1 of 1 people found this helpful
          • 2. Re: relation problem

            Hi Phil


            Thank you for your reply



            I have the following occurences:


            Player Menu::id >---=---< Settings Player Menu::zero (which contains "0")

            Player Menu::season






            available teams::season


            Screen shot attached.


            Player Menu::season is a calculation field: "Settings Player Menu::season" (this field is a global field where the user can set his season to work on)



            Unfortunately, FM is not updating the relation between Player Menu::season and available teams::season, so my portal based on available teams on my player menu layout (based on Player Menu) is not working properly.


            After entering manage DB and getting back to the layout the values are updated and the portal shows what it should be showing.


            Player Menu and Setting relations seems to work as Player Menu::season changer if the user switches to another season....


            Don't know what's wrong.....Bildschirmfoto 2017-03-26 um 21.05.26.pngBildschirmfoto 2017-03-26 um 21.05.42.pngBildschirmfoto 2017-03-26 um 21.05.55.pngBildschirmfoto 2017-03-26 um 21.06.15.png

            • 3. Re: relation problem

              I think it's the fact that you have a global unstored calculation field that is causing the delayed update.


              Try the following:

              make get actual season a global text field and just pick the season from a value list.

              Make the field a calculation field without making it a global field. (This field doesn't need to be global)

              • 4. Re: relation problem



                If get actual season is a text field, it wan't get the data from settings at all.... Only if it is a calculation get actual season will update.


                But then the relation is not working properly.


                I've bypassed the problem by setting a trigger script  on load record, which sets the get actual season (Textfield) to the right season by script


                thanks anyway

                • 5. Re: relation problem

                  If get actual season is a text field, it wan't get the data from settings at all.... Only if it is a calculation get actual season will update.

                  This was to test to see if it made a difference not necessarily as the final fix.


                  And I think all you needed do was remove the "global" storage designation and leave it simply as "unstored".