5 Replies Latest reply on Jan 1, 2010 9:07 PM by noamrsf

    I need help On layouts with 2 tables

    noamrsf

      Title

      I need help On layouts with 2 tables

      Post

      Hello there
      I am pretty new to file maker(Not to databases). I have FMP10 .
      I have 3 main tables created in 3 files(ORDERS,RESULTS,DMG). I have created relations between those tables.
      I need to create a layout that one part of it updates one table and the other part of it is to be updated depending on a field's data.. for example:every order is related to a patient in the DMG file..
      What I created is a layout for the order and a tab(in that layout) that I have put there fields from the dmg file..
      but when i try to run it the fileds from the DMG files in the tab are in no edit status
      My question is how can I turn them to be allow edit..(if someone can show an example that will be very helpful)
      Thanx alot in advance
      Noam




        • 1. Re: I need help On layouts with 2 tables
          ninja
            

          Howdy noamrsf,

          Welcome to the forum.

           

          A few things that would prevent editing.

           

          1. Is the field editable in Browse Mode (Field behavior setting)

          2. Are you editing a value, or inserting a value into a blank field (thereby creating a related record in DMG).  If so, check your relationship (File>Manage>Databse>relationships tab, doubleclick the relationship box...make sure the "allow creation of new records" box is checked properly on the DMG side of the relationship)

          3. Do you have account privileges that allow you to edit data on the table?  If you have FullAccess, the answer to this is yes.

          • 2. Re: I need help On layouts with 2 tables
            noamrsf
              

            hi ninja

            thanx for the reply

            1. yes the field is editable in browse mode.

            2. Since this field (idnum) is actually the relation to the  dmg file, it is sure defined as allow creation of new records(in the DMG file ofcourse)

            3. I have fullaccess yes

            What i thought is to make a portal relation ..you think it would help ?

            Thanx alot in advance

            Noam

             

            • 3. Re: I need help On layouts with 2 tables
              ninja
                

              noamrsf wrote:

               

              1. yes the field is editable in browse mode.

              2. ... this field (idnum) is actually the relation to the  dmg file, 


              Slam on the brakes here.  Your key field in a relation is editable in Browse mode ??!?  This is a highly dangerous thing, please rethink it.  Imagine making a typo in this field...thereby breaking your relationships...and not noticing 'til later.  Use something else (Autoenter serial, perhaps) as your key field.  It should not be editable.

               

              Portals help if you have many records in the DMG table that are related to this one record on your Order table.  But first let's make sure that you can edit the fields as you wish.

               

              This may be me reading to much into it, but you say the "field" is set up to allow new records to be created in DMG.  Did you verify that through the relationships tab under File>Manage>Database?  (I'll assume that you have, if not, please do so)

               

              So there are two fields:  Order::idnum and DMG::idnum and you have them linked in the relationship diagram.  On your layout based on Orders, put the field DMG::idnum.  When you go back to browse mode, it should contain a value.

              Now put another field from the DMG table on the same layout.

              In layout mode, Highlight the field, select Feild Behavior and make sure Enter in Browse mode is checked.

              Now go back to Browse mode and enter/edit the value in this field.  Can you?

               

              let me know and we'll go on from there.


              • 4. Re: I need help On layouts with 2 tables
                noamrsf
                  

                hi ninja

                I did slam the brakes (just stopping before slamming into someone else's coffee (smile)).

                Maybe I didn't use the right words but I use the orders::idnum field as a key and I put that in the layout so when I enter a number in that field it will go directly to the DMG file and collect that idnum specific record from the database..

                and guess what it did work..I used your advices and it did really work..so many many thanks for that..

                so now what I have in the layout is the upper part displaying the ORDERS and the lower part displaying data from the DMG file..

                But I'm open minded if you have an idea to make it better..if you have an example that you can send I'll appreciate that very much in advance

                So what I figured out from this discussion is that portal in this situation is not helpful right now since I have only one record  in the DMG file that will have the specific idnum..Am I correct?

                By the way.. I have many drop down tables for collecting data in the DMG files.. such as gender,birthland birthcity,working city etc..now it works (-:

                So again many thanx

                Noam

                • 5. Re: I need help On layouts with 2 tables
                  noamrsf
                    

                  hi ninja

                   

                  Hi ninja

                  happy new year 

                  Sorry for not replying that long time but my pc ran into trouble and  had to get a new one and replace everything  (-:

                  Well now i am back in air

                  During that long time i was thinking of replacement of the whole database and put all the 3 tables in one filemaker file and access them thru the filemaker server with permissions..instead of creating 3 filemaker files ..Users will get thier resuls anyhow according to their permissions..

                  I have a new question that was bothering me all time.I've got about 6 or 7 different layouts accessing the ORDERS table and about 10 different tables accessing the RESULTS table.. but when I change the layout I get the last record entered in the last layout i was in.. how can i change the script that will show me just the data needed in the proper layout.

                  for example:layout 1 deals with human orders layout 2 deals with PER orders layout no 3 deals with HF orders In   layout  no 1 I enter order 25 and when I change to layout 3  I get the same order 25 i enterd in layout 1.. 

                  What i want is that when I enter layout 1 I will see the last record from human orders and when I enter the layout 3 i will get the last record entered in layout 3 (and not the last from layout 1).. how can i do it if that is possible of course

                  Thanx alot in advance

                  Noam