July 9, 201114 yr Newbies I am still in the learning phase of using filemaker. I have developed a database to calculate specific results from a group of variables. One of the fields within the record is 'clinic'. I would like to populate this field from information entered after the user opens the application. Some of the fields I have populated using a script to enter date & time. I would like to use this same script to populate the clinic field. I am unsure what script parameters to use, and if I can use the 'clinic' field, or create another field? I would appreciate any advice on how to handle this situation.
July 9, 201114 yr There's no reason why you couldn't use Set Field in a script to populate the clinic field. Where would you obtain the value that you wish to set the clinic field to?
July 9, 201114 yr Author Newbies Either use the field itself, or set up a separate field that the latest data could be transferred from. Is there a selection within the script functions to select the last field input, or do you need to specify it through a calculation?
July 10, 201114 yr Not sure what you mean. The value for "clinic" exists in the database. Where? Is each user account associated with a clinic? Do you have a table of clinics? What do you mean by latest data? Perhaps if you more broadly describe your solution...
July 10, 201114 yr Author Newbies The database is relatively straight forward. It consists of a patient table, which has 'clinic' as one of the fields. Initially, I gave users the option of entering their clinic name through a value list that they could use to populate the clinic field when performing calculations. To hasten the process, I looked at setting up an entry table where users could specify their clinic name. I then hoped to use this data to automatically populate the 'clinic' field when they ran the calculation record. I cant use last last field used as once logged in, the user is likely to run multiple calculation records which will not be related to the initial data entry specifying clinic name. Does this help clarify the process I hope to achieve, or do you need more info?
July 10, 201114 yr If a user is associated with a clinic, then the _kF_ClinicID_default could be stored in their user record. Alternatively, you could have them select a ClinicID from a popupmenu attached to a global ClinicID field, and use that to set the clinicID in each new record. To me, a patient record would not have a clinicID, but a child record, perhaps "Visits" would have the foreign ClinicID. I suspect that your data structure could be improved. If you want to elaborate on the tables that you have and how you're relating them, I'd be happy to offer suggestions for improvement. btw- "calculation records" is not a FM term. Do you mean calculation fields?
Create an account or sign in to comment