Jump 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.

current record in script

Featured Replies

Here is the problem. I have an employee layout. When I am looking at an employee on that layout, I want to be able to run a report that shows all info for that employee.

I have a script that runs this report with a button on this layout. The problem is, I don't know the correct way to put in the script, "show me this record only", and not the found set.

I want the correct way for the script to select the current record shown, and print that individual only.

Thanks Dave

You can use the following 3 script steps:

Show All Records

Omit Record

Show Omitted Only

If you want to preserve your current found set, precede the 3 steps with a New Window script step. When you are done previewing the record, you can use Close Window.

  • Author

You can use the following 3 script steps:

Show All Records

Omit Record

Show Omitted Only

If you want to preserve your current found set, precede the 3 steps with a New Window script step. When you are done previewing the record, you can use Close Window.

I don't see how that is going to help. When I go to the employee layout there will be several records. Then I get to the employee record I want. Then I click on the button that runs the script. When the script runs, somewhere in the script it will have to find the current record I was viewing when I ran the script. I don't want the user to be prompted to find the person they want.

So I am looking at the employee record for Bill.

I click on the button that runs the script.

When the script runs it performs a find and selects "the current record only".

Then it runs the report.

I don't think I was very clear before.

I had match current record selected, but it still showed everyone in the found set when I ran the script

Thanks Dave

Dave--

The commands that John noted will give you just the single record you were viewing.

"Show all records" will show every record in the table, *keeping the current record active*.

"Omit record" removes the active record (the one you've been viewing) from the set. This seems to contradict your goal, but see below.

"Show Omitted only" inverts the set to now show only the records that were removed from the found set--in this case, the one record you were originally viewing, but which you removed from the set just above. So you will only be viewing the record that you had been viewing when you clicked the button.

Given your further description, you would most likely use John's advice about opening a new window so as to not trash your original found set.

HTH,

David

  • Author

Thanks,

It does work as you said. i just thought there was a way to say, get the current record. Wouldn't that make more sense than omit record, then show omitted?

I am just trying to figure out the logic behind it.

Thank you to John and yourself for replying

Dave

...i just thought there was a way to say, get the current record. Wouldn't that make more sense than omit record, then show omitted?

Yes, it would be a nice feature, but unfortunately it doesn't exist in Filemaker. So, the standard method is the one John gave.

Create an account or sign in to comment

Important Information

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

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.