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.

Need Help with Relationships

Featured Replies

  • Newbies
I am trying to use a FM database to record the responses of study participants to a series of surveys.  They will complete the studies on an iPad using FM Go.  I have created a table for Subjects and separate tables for each survey.  I want to create a relationship between the subject and each survey, and I've set up these relationships using the SubjectID as the primary key in the Subject table and foreign keys in each survey table.
 
Participants will first complete the subject table then go to another layout for the first survey.  My problem is that I cannot figure out how to automatically relate the SubjectID to the new survey layout.  I can do it using a pop-up menu, having the subject select the proper subject number, but I want this field to be automatically populated with the proper subject ID number.  Can somebody please help a FM newbie?
 
Thanks!

Solved by doughemi

Go to solution
  • Solution

Assuming that the user clicks a button to go to the survey, attach a script to the button:

Set Variable[$$SubjID; SubjectNumber]
Go to Layout["YourSurveyLayout"]
New Record/Request
Set Field[YourFKfield; $$SubjID]

I chose to use a global variable ($$) because if the user goes to another survey in the same session, the number will still be stored.  If the user always goes back to the Subject table before starting a new survey, then you could use a script variable ($)

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.