Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Need simple script to go to previously seen record

Featured Replies

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

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.

Change the script in the Back button to Go to Layout [original layout].

  • 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

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

  • Author

Thanks Gaz!

Frank

  • 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

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

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.