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.

Featured Replies

Im having trouble with a script that needs to run onLayoutLoad.

I have a member's database that i am starting to setup users in. Each user's username is their email address. Each user also has a record in the database.

What i would like to do is once the user logs in, have the database open up to their record.

I've tried to setup a script that would Perform Find or Enter Find Mode, but it seems i cannot use the Get functions.

For eaxmple, what i've tried to setup is a script that would look like the following:

Members::Email = Get ( AccountName )

Problem is when i use the specify find requests, it actually searches for an email address of Get ( AccountName ).

Hoping someone could point me in the right direction. Thanks

You need to use:

Go to Layout (Members)

Enter Find Mode

Set Field [ Members::Email ; Get (AccountName)]

Perform Find

There might be issues with the @ character in a find, since that is a special use character in Find. You'll need to escape it.

And so, perhaps you shouldn't have their account = their email address. Just have their email address as part of their User record, as is AccountName.

Edited by Guest

  • Author

Thank you for your assistance. One last question. I setup a button to run the script to temporarily test the function and i would like to take it a step futher. Once their record is brought up, i would like to switch them back to browse mode and have all records available. I setup my script as so:


Enter Find Mode []

Set Field [Members::Email; Get ( AccountName )]

Perform Find []

Enter Browse Mode []

Show All Records





I've also tried:





Enter Find Mode []

Set Field [Members::Email; Get ( AccountName )]

Perform Find []

Show All Records

It seems as if the user is still locked into their record until the phycially click the Show All Records button. Do i have this scripted wrong or is this something FileMaker cannot do?

I should also mention that this database is primarily used in IWP. Thanks

Users are automatically in Browse mode after Perform Find. If you Show All Records, then you've defeated your purpose.

I'm not very familiar with IWP, so I can't say what will not work using IWP.

Perhaps using Extend Find will allow you to bring back the other records, while still maintaining the found record as the current record.

  • Author

Perhaps im wrong but if i were to manually search for a record and then click the show all records button, i would still be looking at the record i searched for but would no longer be bound to the search criteria. This is what i am trying to accomplish.

The only reason i am trying to setup this script is due to the fact that the people using it are not very computer savy and when they login they are expecting to see their own record. I've written a tutorial as to how to search for their own record but i still get at least 5 emails a day from people asking why when they open the database is brings them to the first record and not theirs.

Just trying to make it as easy as possible for the end user.

Oh, of course, you are right. The current record would not change if you add Show All Records after the Perform Find. What do you mean that they are "locked"? The found set hasn't changed?

  • Author

Correct, they are locked into the found set. If i click the previous or next record buttons i am unable to go to other records.

If i manually click Show All Records i am able to browse other records, i would just like to be able to have this done automatically as i know the end user wont know what to do.

I don't see why your script isn't working. Sorry. Does anyone else?

By the way, rereading your original post, you mention that you've assigned this script as an onLayoutLoad trigger. I don't see the need for that. Just put it in the Open Script.

Edited by Guest

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.