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.

newbie; simple relationship problem

Featured Replies

hi

im building a databas with a contacts table, and a table for notes connected to the individual contact. the idea is that for every contact you can make notes, t.i. one contact can have many notes. what i want to do right now is to have a button on the contact side, that when pushed creates a new note, and automaticly fills in all the needed contactinfo (name, adress, etc.) on said note.

i already have a note_id (to keep track of individual notes), and contact_id on both sides to connect the one-to-many relationship.

how do i get the button to work?

thanks

Sounds perefect for a portal entry method.

As relationships work in both directions then you need not fill in the supplemental information as it is directly available by using related fields.

When you use a portal for data entry the key field(s) is/are automatically filled in the related table (otherwise it wouldn't work).

  • Author

im sorry, i still dont get it to work...

ive got portals for name_id, name_full, and name_adr on the notetable now, and ive got a button on the contactstable linking to the other layout (notes), but it still doesn´t wrok.

i dont think ive done the linking right, but im to stupid to figure it out for myself...

Edited by Guest

A picture (file, in this case) is worth a thousand words. The button has an optional script parameter assigned so don't forget this when you try to recreate it in your own solution.

contacts.fp7.zip

  • Author

thanks... that solved it!

follow up question though: i want a button next to the note, in the "contacts" table, linking to the specific note in the "notes" table. t.i. when i click it i want it to get the specific note-entry. ive got a note_id, but i dont know if im suppose to lock the variable and then perform a search?

anyhow, little help please ?

It is simple to get to a "portal row's" record in its original table's layout; because the portal row knows who it belongs to. So a simple Go To Related Record, using the same relationship as the portal itself, will go to it, and you can specify the layout. The [x] Show only related records option will narrow the found set in Notes to those belonging to the Contact.

It is much the same as a Go To Related Record [ portal relationship ] button outside the portal, except when inside the portal it ends up on that particular record, instead of the 1st of the relationship. The "1st" is either the 1st entered (default), or the 1st by the Sort of the relationship, if any.

I sorted the portal by the timestamp, descending. I think this is the most useful for notes, latest on top, old ones fall out of the portal.

I also used a new window for the Note view, with resizing. That's option. You can just flip to the layout instead.

contacts_new.fp7.zip

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.