AnsweredAssumed Answered

Creating records in join table through portal

Question asked by JonKinney on Jul 14, 2013
Latest reply on Jul 16, 2013 by philmodjunk

Title

Creating records in join table through portal

Post

     Hi there!

     I'm an experienced web application developer (Ruby on Rails, PHP, and .NET), but am setting up my first Filemaker system so a friend can hopefully more easily support it herself for her music therapy business. She needs to have clients with many objectives. Objectives belong to a goal. Sessions and objectives are joined through sessions_objectives as each session needs to note whether or not the objective was met during that session.

     What I currently have working:

     1) Create a therapist

     2) Create a client

         a) Add multiple objectives to the client record

         b) Select the goal when adding an objective

     3) Create a session

         a) Select a therapist from a drop down

         b) Select a client from the drop down list

         c) date/time auto-populated

         d) Type in location

         e) Type in notes

         f) Select multiple treatments (checkboxes)

     What I don't have working yet is the next section on the sessions form (shown below the relationship graph below). I need to add a portal for the sessions_objectives join table and add new records to each session that pull in all the client's objective and lets her type in a field whether or not the objective was met. She has special syntax for this so it's just a text field/string, not a checkbox/boolean.

     I was able to get the objective_id_fk from the sessions_objectives join table to populate the drop down with only that patient's objectives (so she can pick one or more objectives to work on in that session). But I'd like the session_id_fk to be auto-populated in the join table by the current session's id, and then then she has to type in the 'met' field in the join table. I tried for 4-5 hours to try to get this all working, but I'm stumped. Any help would be greatly appreciated. 

     Here's the relationship graph:

      

     And below is the form I'm trying to get to work. You can see I'd like to pick the objective from the drop down and then have the description and goal populated in each portal. Each of these sessions_objectives records needs to be unique to the session. If we create a new session and select a patient that has already had a session previously, no records should show in the join table portal because they're per-session with a 'met' field that needs to be entered for every objective each session (hence the sessions_objectives join table). I was having some issues with this too.

      

     By the way, I do have allow creation of records in this table for the sessions_objectives table on both sides of the relationship. Here's the screen for the objectives -> sessions_objectives side

      

     So what I'm asking is how to do what I have in the annotated form above since it doesn't work how I think it should.

      

     Thank you!!!

Outcomes