2 Replies Latest reply on Aug 23, 2013 4:57 AM by Barzidehmd@gmail.com

    Multiple record update through a portal or is there a better way?


      Hi. I am fairly new to FMPRO and would appreciate any help I can get. I am building a patient database to track multiple fields. For security reasons and to avoid manual entry of data I am importing just a patient account number into my database. Name, Medical record number, Date of Birth and other information reside on the ODBC database and are linked to (so that if someone were to copy the database, all they would get is the account number). Once the accounts are imported, I select 30-40 patients to follow out of 140,000 patients. I would like to be able to design a portal or a method such that a search result (the 30-40 patients I am following) can be listed on a tab and instead of jumping around between tabs and from patient to patient to update the records, I would use the portal to update the records of multiple patients at the same time. When I made the portal only the current patient shows up. How do I make the records on the current search results to auto-populate in my portal rows? A few screen shots are included. It may be helpful to mention as well that I can and would like to use the same method to print a work list/report. Any and all help will be much appreciated. Sam

        • 1. Re: Multiple record update through a portal or is there a better way?

          Hello, Sam.


          What you want to do is possible, but a little arcane. Essentially, you'll need to set up a few things to make this work:


          1) A global field matching the type of the key field of your patient (number, text, whatever).

          2) A relationship between that global field and the key field of the record you're currently browsing.

          3) A method for assembling the record IDs of the found set into a return delimited list and inserting that list into the global field.


          You'll base your portal on that relationship:


          GlobalField ---<  PatientID


          Now, step 3 is the tricky one. There are a couple of different methods.


          1) You can write a script that loops over the found set and stores the IDs in the global field, something like this:


          Go to Record / Request / Page [ First ]

          Set Field [ GlobalField ; "" ]


            Set Field [ GlobalField ; List ( GlobalField ; PatientID ) ]

            Go to Record / Request / Page [ Next ; Exit after last ]

          End Loop


          You'll have to run that script whenever you do a Find. A Script Trigger can be used to accomplish this, or you can run it manually via a button.


          2) More sophisticated is to use a Custom Function to assemble the list. There's one on Brian Dunning's site that assembles the list for you (http://www.briandunning.com/cf/1093). However you'll need FileMaker Pro Advanced to insert it into your database. Once you do that, you can have the field automatically calculate the value using a global calculation.





          • 2. Re: Multiple record update through a portal or is there a better way?

            Thanks for the quick response. Ill give it whirl.


            Sent from my iPhone 5