two ways are possible...
make a identical second table in your database. the button "discharge" marks this record as discharged, switches to the identical archive table, imports the marked records, switches back and deletes the marked records.
the button only marks the record as discharged. then you have to add the status "active" into every search request, AND you have to make a search "active" instead of your "show all records"
greetings from germany
Thanks for the response... I am very new at filemaker.. I wanted a script that would be compatible with instant web publishing.. basically something that would delete and transfer so that doctors would only "see" a list with patients in hospital but would be able to go back and see previous patients. Something that I have been trying as well is a layout that would only show hospitalized patients.. but I Have not been able to do so.
To see only "active" patients, all you need to do is perform a find. Assuming you have a DischargeDate field (as you well should), find records where this field is empty. This can be scripted, and there is no need to move records from one file/table to another.
Thanks that worked out great :smileyvery-happy:
Now just one more thing is there any way to create a layout where a dialog box would ask for dates to create a list of patients adm from lets say 1/2/09 to 4/1/2009 ?