How do i auto populate a field to a related table in FileMaker Pro 11

Posted on 2011-02-13
Medium Priority
Last Modified: 2012-05-11
Hey everyone,

I have three tables set up in my database. Caseworker Information, Client Information, and Mail Log. What im trying to accomplish is :

Step1 on caseworker information form...Enter the municipalities that the worker supports.  <----- I did this by setting a value list and having check boxes.

Step 2 Once case worker is enrolled go to the client information section. Within the client information form... Have a drop down list of municipalities. select the manicipality the client lives in  <---- I did this with the same value list that i used in step1 for manicipalities.

Step3 Once selected on manicipality...I have two other fields on the client form.. Caseworker code which is the primary key in the Caseworker Table and another field case worker full name.

Now what i want to do is... after selecting the municipality for the client... have two fields... Case worker Name and Case Worker Number. The case worker number field would be sorted by the selection of what manicipality you selected . For Ex. If say Mr Smith did manicipality A  and Mrs. doe did manicipality B.  An within the form you selected manicipality A. Then Mr. Smith would be the only one to show up under the caseworker code section. After the case worker code section is filled in...i would like the case worker name section to automatically populated from the field caseworker code...since everycase worker has a unique number.. Please help ive spent 5 hours on this and drank 3 red bulls and cant figure out what scripting to do on this? Thanks

attached to this message is a screen shot of the relationships. Thanks again. Ray Z
Question by:SirusComputers
  • 3
  • 2
LVL 12

Expert Comment

ID: 34885245
This can easily be done if you understand "Context" and relationships.  First, create a relationship between ClientInformation::Municipality and CaseWorkerInformation::Municipality.   Once you have completed step 2, the relationship will display all the CaseWorker records that have been assigned to that Municipality.  Now you can create a Value List using the context of that relationship to produce a list of CaseWorkers.

Unless the Case Worker Number is a know data element that everybody just "Knows", the I would only use the name and let FM fill in the number for you.

Here is a little sample I through together for another question.  You may have to study it a little to get the gist of it, but I think it is what you are looking for.  Focus on the Part Picker layout (if it would help, I could rename it to CaseWorker Picker) and look at the field ui_rev (this could renamed to Case Worker).  What it allows you to do is pick a value and have it return the key.
LVL 12

Expert Comment

ID: 34885248
Now, if I could only spell Threw..  LOL

Author Comment

ID: 34885380
Thanks for help but still so lost... I thought you only make one relationship to each table ? I posted in my above message my current table setup.
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Author Comment

ID: 34885447
Ok so say i create a relationship between ClientInformation::Municipality and CaseWorkerInformation::Municipality and i make it look like this...look at picture pasted to this for relationships. Now my value list in clientinformation for municipalities is built off the master value list used in caseworkerinformation. What i want to happen is... you enroll your case worker to the municipalities they cover. Then in clientinformation... when you select the municipality the client lives in.. it then triggers in the field worker code  on that same form to shower only the workers that serve that municipality.
LVL 12

Accepted Solution

North2Alaska earned 2000 total points
ID: 34887322
OK, I think I see where you might be lost.  :-)  First, don't panic, but let's see if we can really blow your mind.  :-P

The relationships screen shot you sent is commonly called the Table Graph or TG and each table is a Table Occurrence or TO.  If you are familiar with any other database or design tools, you may think the TG is an ERD, but it's not.  You can have many TOs of the same table.  I tend to think of these as defined searches.  For example, here is the TG of a project that I'm working on.   Herd.pdf  As you can see there are only six actual tables but many TOs.  

So back to your database, I created a new demo to match your sample to give you a clearer picture.  First, I use the Anchor buoy method (there are lots of great examples of this method on the net).  So, your relationships always start on the left and move to the right.  I create three TOs for CaseWorkerInformation, one for the actual relationship; ci » CWI.  One for the Municipality value list; ci » CWI__ByMuniValueList.  And a third one for the technique we use for getting the Key but using the name; ci » CWI__Name.

Next I created two Value list.  The one for all Municipalities is pretty straight forward (I would consider creating a table of Municipalities and building the value list from there). The other we need the addition of using only those that are related.   ValueList.tiff

Finally, I create a script, AssignWorkerKey, that will be use by a trigger to assign the WorkerCode to the ClientInformation table:  Set Field [CI::_FKWorkerCode; ci » CWI__Name::__PKWorkerCode].

Now we put it all together.  I created a Layout, User Interface, that will allow you to create a new record (or change an existing one) and assign the worker to the client based on the workers that are in the same Municipality as the client.  Play around and see if you can follow what is happening.  Then fire back additional questions.

Note:  I use a site to help with naming conventions and the like.  It's worth a read...  http://filemakerstandards.org/

Good Luck...

Expert Comment

ID: 35364704
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…
When you have multiple client accounts to manage, it often feels like there aren’t enough hours in the day. With too many applications to juggle, you can’t focus on your clients, much less your growing to-do list. But that doesn’t have to be the cas…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question