![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have two tables: Organizations (containing a PK_org:number;serial and Name:text) Addresses (containing the regular fields for a mailing address + addresstype:text + FK_org:number) I want the user to be able to associate any number of Addresses with an organization. I have a relationship associating the tables as follows: Organizations::PK_org -> Addresses::FK_org And I think that's alright. On my Organization layout, I want the Organization::Name field, then a list of all the associated addressesTypes, and then a set of fields for city/street/country etc. Clicking on one of the addressTypes that are displayed in the list should then update the set of city/ street etc fields. I tried to use a Portal view. I liked that it showed me the list of all the associated addressTypes that relate to the current organization, but changing the portal view (or adding a new item to it) doesn't cause the other fields to update. Essentially, I'm trying to use Portal View as a navigation control to move the cursor through the set of records returned by the association. The fields aren't changing because they're only displaying the first match in the relationship. I realize that.. but am not sure what approach to take. Do I make another relationship between the two tables, and add a second criterion that associates the entry selected in the portal with itself? Hmm. Bit lost. I could just use the portal view to view the entire record or put a "go to" button, but I'd really just prefer to have a dynamically generated list of the addressTypes (home, office, etc) and let the user click one to view that address record's data. Any suggestions? Thanks, Woody |
#3
| |||
| |||
|
|
your field definitions for Organization, add the field _kf_idAddress. To your relationship, add Organizations::_kf_idAddress = Addresses _kp_Address. Instead of a "Go To" button, you'll have a "set field" button, but users won't know that. Make the AddressesType field in the portal a button that Set Field (Organization::_kf_idAddress; Addresses_kp_Address). Users will click on the portal row, unknowingly clicking on the button, that will set the field in Organizations finishing the relationship. |
Good tip: Thank you. I hadn't![]() |
| Thread Tools | |
| Display Modes | |
| |