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.

A seemingly simple Set Fields command isn't working

Featured Replies

I've got a script that should do some very simple record creation work.

I have a Students Table and a Programs Table. In the Students Table I have a portal that shows the Programs Table information related to the record in the Students Table.

I've created this script to, once you're looking at a student record, add a record related to this student in the Programs Table (therefore having it show up in the portal).

My script creates a new record and somehow misses the step of Set Field piece and goes right on to the next field.

Can anyone offer a little insight?

Thanks so much.

//ichael

--

Script:

New Window [Name:"Enter New Program"]

Go to Layout ["Programs"(Programs)]

Enter Browse Mode []

New Record/Request

Set Field [Programs::Student ID; Students::Student ID]

Go to Field [select/perform; Programs::Current Program]

Pause/Resume Script [Duration 9seconds0: 120]

Close Window [Current Window]

Go to Layout [original layout]

Edited by Guest

How are you picking up the StudentID? When you go to another layout based upon a different table occurrence, FM won't know which Student is related so you need to take along that information. Add this to the beginning of your script:

Set Variable [ $StudentID ; Students::StudentID ]

Then change your Set Field[] to:

Set Field [ Programs::StudentID ; $StudentID ]

... and add this line after you've set the fields:

Commit Records/Requests

LaRetta

  • Author

Bless you LaRetta!

:

Worked splendidly!

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.