3 Replies Latest reply on Aug 4, 2011 11:56 AM by philmodjunk

    Show Field From Another Table

    KAmsinger

      Title

      Show Field From Another Table

      Post

      So I have this group folder system setup where it is housed on 1 table, but then the group name selected is shown in a text field on another table. I have noticed that because it has to pull this group name selected from another table it is slowing down my database. Is there anyway I can set it up in the script or through relationship tables that once a group is selected for a unique Record ID that it pastes the name of the group in a separate and new text field that is on the same table as the record so it no longer has to pull from the other table which group it's in? 

      So if I am in my table called PERSON and I select a group folder that is in a portal but is housed in another table called GROUP, I want to take the group name selected that is now showing in my portal and paste that name into a new text field in the PERSON table. So it no longer has to register the group name selected for a person when it loads a record. Therefore speeding up the processing time for a record to load. 

      Thx

        • 1. Re: Show Field From Another Table
          philmodjunk

          I'm not completely sure the script will be faster than your current set up, but Set Field in a script can move data from field in the related table into a global field or into a field defined in the person table.

          Set Field [Person::Yourfield ; Group::GroupName ] //this accesses the first related record.

          If you have FileMaker 11, you could also use Set Variable to move the data into a variable which you can then place on this layout as merge text <<$$VariableNameHere>> to display the name.

          • 2. Re: Show Field From Another Table
            KAmsinger

            I do have filemaker 11. So how would I setup the Set Variable to move the data into the new variable?  Also, not sure what you mean by merge text?

            • 3. Re: Show Field From Another Table
              philmodjunk

              Set Variable [$$GroupName ; value: Group:GroupName]
              Refresh Window

              If you enter layout mode, you can then use the layout text tool to add this layout text to your layout:

              <<$$GroupName>>

              If $$GroupName is empty, you'll see the above text when in browse mode. When you run the above script, you'll see the group name instead.