Jump to content

newbie; simple relationship problem


This topic is 6518 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 6518 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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