September 23, 201510 yr Apologies if this is in the wrong section. I've got an db for lesson observations. it's used via iPads. Teachers observe lessons and fill out some information based on a form. The issue I have is that when two teachers observe the same lesson and create observations, it appears that only 1 of them is actually been saved to the table(s). is there a setting that needs to be changed to allow two people to write to a table at the same time as we really don't want to be losing an observation or more each time they are carried out as we can have numerous members of staff observing lessons at the same time.
September 23, 201510 yr No setting, this is default behaviour. You will need to adjust your design to accommodate multiple users adding observations to a lesson. FM locks the record that a user is editing. But if you add records in a portal, both that edited record AND the parent gets locked, which is probably what you are seeing. So give the users an interface to add observation records without doing it in a portal.
September 23, 201510 yr Author They are doing it in this way. They click add new and go to a layout which creates a new record. I am expecting it to create two separate records in the table for the person being observed but it doesn't appear to be doing this.
September 23, 201510 yr That should work without locking people out... each user would have its own record without any locks. Can you post your script?
September 23, 201510 yr Author its just a very simple script.its attached and then it calls another script which is also attached.
September 23, 201510 yr You really need to get rid of the copy & paste.... Use Set Field instead, gather the info once and then go to the lessonsobs layout just once. Can't really make out what the exact sequence is from these screenshots. But you should be able to determine with the script debugger at which step in what script the lock happens. Work backwards from there.
September 23, 201510 yr I certainly agree with Wim's suggestion regarding copy and paste. In case this way of scripting is unfamiliar to you, it would go something like this. No need to copy paste, no need to keep bouncing back and forth between layouts. Go to Layout [ "ObsMatrixTemplate" ( LessonObsMatrixTemplate )] Set Variable [ $progOutstanding; LessonObsMatrixTemplate::ProgOutstanding ] Set Variable [ $progGood; LessonObsMatrixTemplate::ProgGood ] Set Variable [ $progReqImp; LessonObsMatrixTemplate::progReqImp ] Set Variable [ $progInadequate; LessonObsMatrixTemplate::progInadequate ] Go to Layout [ "LessonObs" ( LessonObservations )] Set Field [ LessonObs_OBSMATRIX::progOutstanding ; $progOutstanding ] Set Field [ LessonObs_OBSMATRIX::progGood ; $progGood ] Set Field [ LessonObs_OBSMATRIX::progReqImp ; $progReqImp ] Set Field [ LessonObs_OBSMATRIX::progInadequate ; $progInadequate ]
September 23, 201510 yr Author thank you both. The copy and paste method was something I did when I was very new to filemaker and just teaching myself things. I've since learned a lot (through this forum) but haven't had a chance to go back and alter previous things to ensure they work more efficiently.I intend to do this tonight now.
Create an account or sign in to comment