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.

DAtabase in a database

Featured Replies

  • Newbies

Does someone know if it is possible to make a database linked to one record so that each record have the same database linked but with other values.

Because if i make a hyperlink to another database i have to make each time that i make a new record a new linked database.

Could someone help me PLS

THX

  • Author
  • Newbies

An example:

I have a database with patients. Each patient have different treatments ( that can be chosen with a lookup field see problem 2). I want to link a tabel/ collon to that pati

This is a very typical use of a database. If you define the relationshp based upon a "patient number" you can display the treatment records for just the selected patient in a portal based upon that relationship. If you set the portal to "allow creation of related records" you can add treatments (records in the related file) by typing in the last (blank) row of the portal.

-bd

  • Author
  • Newbies

Ok

Two techniques are needed. First single or multiple pieces of data can be passed from one file to another using global fields. To pass the treatement to the second file, set a global field in the first file to the selected treatment (call this field "gTreatment"). To access this global from the second (treatements?) file, you will need to create a calculated field in each file:

kOne (calculation, number, indexed) = 1

From the second file, create a relationship with the first file matching kOne <--> kOne. Now you can use this relationship to access the global field(s) in the first file. Why a global field? Because only a single fields exists per file, not one per record.

Next, create a script in the second file to create a new records and do a set field:

SetField(Treatment, FirstFile by kOne:: gTreatment)

Now create a script in the first file to copy the treatment to gTreatment and run the record creation script in the second file.

-bd

Relationships aren't necessary for accessing global fields between tables, and I believe a File Reference can access globals between files (don't quote me on that though). Even so, a constant calculation relationship shouldn't be necessary. That's what the Cartesian join (X) operator is for.

Oops! Thought it was a FM6 question.

-bd

oops2.gif

Ah, makes sense then. That happens to me too, sometimes. wink.gif

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.