swf Posted April 12, 2005 Posted April 12, 2005 I have a 3 table that are linked. patients is 1:many to medication. medication is 1:many to prescription. Each patient has many medication entries and each medentry can be printed as a prescription many times. linked by fields patientid, medentryid and prescriptionid. In my script to create a prescription I have the script parameter as the medentryid to isolate the one being worked on. Then in the script I set field Prescription:medentryid=medication:medentry. Following that I fill in the rest of the info,Set field Prescription:prescrip_medname=Medication:medname etc. Everything works except for 1 glitch. I have a related field all the way back to patient table which is the patient name. So the medentry Id is related to the patient id and patient table has the patient name. Although the medentryid in the prescription table is populated correctly it will not show the related field patient_name. However if I click into the edit box of medentryid and retype the same exact number that is present and hit return, then the name pops up and is correct. I have two Ideas. Maybe it is a text vs number issue caused by passing the medentry number as a text parameter. Idea 2: Maybe the medentry id is not committed into the field. I would appreciate any ideas.
swf Posted April 12, 2005 Author Posted April 12, 2005 I have been tinkering further and got it to work. Basically what I did is I added a line to the script to have filemaker replace the text in the medentry field with a number. I did insert calculated result (medentryid=getasnumber(medentryid) and then commit record. I wish it was easier to use the script parameter and convert the data to the appropriate form (text,date,number) earlier on. Maybe there is a way which I don't know about. any comments?
Recommended Posts
This topic is 7168 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now