Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Simple Portals not allowing creation of new Record


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

Recommended Posts

  • Newbies
Posted

Hello all.

I am a frustrated individual. First I'll tell you my initial problem, then where I am going. For background I am a long time software developer using SQLServer and C++/C#. However don't think I dislike FMPro because it is different than what I am used to - I know it is just that I am having a difficult time adjusting my way of thinking.

Problem one - I have two tables Clients and Contacts. Joined by Client::ID == Contacts::ClientID. Both are numbers. When I put a portal on the client form I get nothing. I can't edit, nor can I tab into any fields on the portal record. I am sure I am doing something simple wrong but I am pulling my hair out trying to figure it out.

Real problem. I am not used to not having nested portal type ability. I want to display on the client info page a portal with a list of Contacts. When the user clicks on a contact in the contact portal, the contacts address info is displayed. I have three tables Clients, Contacts, and Addresses. Clients can have one to many Contacts, and clients can have addresses. Contacts also have addresses. How exactly do I make this happen in a layout?

Thanks for the help and please go step by step as everything is pretty tough for me at this point.

Andy

Posted

Andy:

Welcome to the Forums.

Portals are pretty easy to screw up on at first, especially if you haven't encountered their like before. Here's a checklist for you:

1. Make sure that the portal is showing the correct relation by double-clicking on it in Layout mode.

2. Make sure the fields in the portal are Related fields. Double-click one and make sure that the pull-down in the dialog box is set to your relationship, rather than to the "current table.

3. Now the portal should work. If you're still not seeing any data, make sure that:

a. There are related records to draw from (where Client::ID = Contacts::ClientID)

b. There is actually data in the fields you're showing in the portal.

I'll leave the rest of the functionality alone for the moment.

-Stanley

  • Newbies
Posted

Thanks Stanley. 1 and 2 are fine. As for 3, according to the help file I can create records by simply editing the "last row" of the portal. I currently have no records in the contacts table. I'll create a new form and generate some just to see if they show up, but I would much rather be able to just click the last row and create a new one. Possible?

Andy

Posted

Andy:

Hmm. The help file is wrong in that case. Certainly, just to test it, enter a couple of contacts and see if they show up.

You'll have to create a script to generate a new (empty) portal row - really you'd be generating a new related record.

-Stanley

Posted

I can't edit, nor can I tab into any fields on the portal record. I am sure I am doing something simple wrong but I am pulling my hair out trying to figure it out.

Just a quick question, is allow creation of related record chosen for the many side??

--sd

  • Newbies
Posted

sd thanks. I knew it was something really simple like that. The help file is correct you then simply click on the last row and create the new record.

Thanks so much. It's always the little things that get you.

Can anyone speak to my second issue?

Thanks again - I am impressed with the speed and thoughtfulness of this forum. Keep up the good work

andy

Posted

It sounds like you want to select a Contact in your Contact portal and have that Contact's address show up on the Client layout. You can do this by using a global 'gContactID_Selected' in the Client file to hold the ContactID of the Contact record that is selected in the portal. Have another table occurance of Contact linked to Client by

Client::gContactID_Selected = Contact::ContactID

Now put fields on the Client layout based on this new TO. Finally make a script to set the global when a Contact record is selected in the portal, and a script to clear the global (or set it to the first ContactID,) when the user navigates from record to record, or into the layout for the first time.

Posted

How exactly do I make this happen in a layout?

You don't. blush.gif FM7 made many improvements over FM6, but "two-deep" portal functionality is one that is lacking. Your best bet is probably to use a button that calls a Go To Related Record step takes the user to a layout showing the appropriate addresses. (I can give you more detail on that if you need, but i get the feeling you'll be OK with that. smile.gif )

HTH,

Jerry

This topic is 7255 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.