November 15, 200421 yr I am a teacher and am creating a database for use by teachers at my school. The database will contain student records. Each student record contains a Help button to assist teachers using the database. The student records are on 1 layout, the Help info is on another layout. QUERY: could someone please provide me a (simple if possible) script which will take the teacher back to the student record they were looking at before clicking the Help button on that record. At the moment, the Back button on the Help layout takes the student to the first record of the layout that the student records are on, and not to the record the teacher was looking at. Assistance greatly accepted! Frank B
November 15, 200421 yr If I understand you correctly, you have a database consisting of (eg 100 records corresponding to 100 students) Your question is, If a teacher is viewing student No. 084 and clicks the help button, The layout changes to a help page, but when the Back button is clicked, it reverts to student 001 ? If this is your question, If the 'Back' button on the help page, just says "goto layout" and then select the Student Record Layout again, the current record shouldn't change, unless the help button and back buttons call up scripts that select different records for some reason. If this is the case then you could store the last viewed record in a global field when the help button is pressed: create a global number field (eg lastrecord) When you press the help button, the script does the following: Set (Specify Field) lastrecord (Specify) Status(CurrentRecordNumber) Then Go To Layout (Help layout) The button on the help page would... Go To Layout (Student Record Layout) Go To Record Request (Specify) by Field - 'lastrecord' This should then return you to the previous record Hope this helps Gary Tamblyn.
November 15, 200421 yr Author Transpower - I tried your suggestion but it simply stayed on the Help record. Gaz - I'll try your suggestion and let you know what I end up with! Thanks BY THE WAY - is it possible to set page orientation (portrait / landscape) from within a script instead of calling up the Print SetUp dialog box? A bookon FM7 I bought says a PageSetUp_Portrait and PageSetUp_Landscape script is included in all their databases - but the book and CD gives no scripts to do this. I am a newbie to scripting Frank
November 15, 200421 yr You can set the format of a printed page in filemaker by adding a page setup command. I've explained it in the attached document, good luck. Pagesetup.zip
November 20, 200421 yr Author Problem Solved I made the field (on my Help Layout) where I wrote all the help info a global field. The return button on that layout then said Go To Layout(Layout I came from) It works perfectly Frank
November 23, 200421 yr Since you are using FMP 7 you could open a new window and display the help info in there. A close button could .. well .. close the window. Which brings the user back to the student record he/she was looking at. No need for global fields etc.
Create an account or sign in to comment