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 after go to layout?

Featured Replies

  • Newbies

Which record becomes the current record after a 'Go to layout' script step?

So far it seems to return to the last record I was working on, but I can't find a place that clearly confirms that.

For background, what I'm doing:

I'm trying to connect people to organizations through an 'ORG CONTACTS' link table. While on the organization layout, they click a button to add a contact person -

copy [select; ORGANIZATION:Org Name]

Go to Layout ["ORG CONTACTS"(ORG CONTACTS)]

New Record/Request

Go to Field [ORG CONTACTS: Org Name]

Paste[select]

Go to Layout["CONTACTS"(CONTACTS)]

Enter Find Mode[Pause]

Perform Find[]

Copy[select; CONTACTS::Contact ID]

Go to Layout ["ORG CONTACTS"(ORG CONTACTS)]

Go to Field [ORG CONTACTS:: Contact ID]

Paste [select]

- can I safely assume to be returning to the same newly created record on my second Go to Layout["ORG CONTACTS"(ORG CONTACTS)]?

Thanks!

Copy paste should be seriously avoided in scripting.

Try something more like this:

set variable[$orgname ; ORGANIZATION:Org Name]

Go to Layout["CONTACTS"(CONTACTS)]

Enter Find Mode[Pause]

Perform Find[]

set variable[$id ; CONTACTS::Contact ID]]

Go to Layout ["ORG CONTACTS"(ORG CONTACTS)]

New Record/Request

Set Field [ORG CONTACTS::Contact ID; $id]

Set Field [ORG CONTACTS::Org Name; $orgname]

Commit Records

  • Author
  • Newbies

Yeah, I also cringe at using copy and paste - but it doesn't seem like Filemaker7 _has_ set variable()

My only other option (which I've used elsewhere) seems to be global table variables, which won't work unless they're displayed on the layout *wince*

I'm teaching myself Filemaker, so I really appreciate advice!

Welcome Chardin to the forums.

Your script needs help.

How about taking apart this demo? It shows how to script the assignment of a Person to an Organization and an Organization to a Person using a join table PeoOrg.

Notice the relationships are all done with IDs, not names!

Yikes! Didn't think that you were really using FM7. Sorry, this uses $vars and Exit Script ( ).

How about using global fields? That's FM7 friendly. You could also simply allow creation of related records in the relationship, and use value list popup menus in the join table portal.

JoinDemo2.fp7.zip

Edited by Guest

"My only other option (which I've used elsewhere) seems to be global table variables, which won't work unless they're displayed on the layout *wince*"

There is no such thing as a global table variable.

There are global fields; and the set field step does NOT require the fields to be on the layout.

My only other option (which I've used elsewhere) seems to be global table variables, which won't work unless they're displayed on the layout *wince*

It WILL work if you use Set Field[]. Another option is to use a script parameter.

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.