1 Reply Latest reply on Apr 22, 2011 9:19 AM by philmodjunk

    How to update record based on information in current layout ?



      How to update record based on information in current layout ?


      Hello experts,

      I wanted to find easiest way of updating rows of certain table based on current displayed data

      For example I have two tables


      client ID client name ssn dob
      001 John doe 1112223333 10/10/1976
      002 Jane smith 222334444 10/1/1980
      003 Maria S 333445555 1/1/1970


      clientid progress Id Progress notes date Goal
      002 1 First session 1/1/2011 check health
      002 2 second session details 1/31/2011 Follow up
      001 1 First Session for Client 3/2/2011


      002 3 Thirds session for this client 4/1/2011


      I have layout where Progress Notes are displayed for a particular client. I wanted to achieve following

      1. Current view should show me all the Progress Sessions for a given client. 

      2. When I click on add new record, it should go to progress table and read the last progress ID for a given client and increment the progress

      The goal is to increment progress ID only for the relevent client, in above example client 002 visited twice and it had two progress sessions.

      Sorry for the long post, I am fairly new to the concept of Relational DBs and Filemaker!

      Thanks for your help!

        • 1. Re: How to update record based on information in current layout ?

          1) Have you considered using a portal to Progress located on a Clients layout? This makes it easy to add new Progress records simply by entering data directly into the bottom blank row of the portal. This isn't the only option, but it is the easiest to implement. If you use a layout based directly on Progress, you'll need to implement some method for linking each new progress to the correct client. You can format the ClientID field with a drop down, or you can set up a system where the ClientID number from the current Client Record on a client layout is stored in a global variable or global field so that new Progress records auto-enter this ID to automatically link them to the correct Client record. (This requires first finding the client on the client layout and then clicking a button to perform a script that puts a copy of that client ID into the field/variable and then changes to your Progress Notes layout.

          2) This can be problematic if you might have two or more users adding Progress Notes for the same client at the same time. This also may be unecessary. How will you use this number? If it's just to label the sequence of each progress note, the layout text object @@ can be used on the layout to number them in order.

          If you do want this number in an actual database field, see this demo file and be very careful how you set up the auto-enter field options or it doesn't work correctly: http://www.4shared.com/file/hB9Oy8r-/SubSerialNumberTest_III.html