Newbies skay Posted December 8, 2001 Newbies Posted December 8, 2001 I have a question regarding adding a new portal record. There are 2 possible solutions, neither of which I can figure out. I have a portal in a customer database that is showing records from a contacts database. I want to be able to create new contacts from the customer database. So far this is the easy part. I have a couple of issues that I'm trying to overcome. The first field in my portal is a calculation field from the contacts database that is merging the first and last names to show the full name. In the portal, you can't create a new record by clicking in this field, because it isn't an editable field. I can create a new record by going to the next field, but that isn't real user friendly. I would like to be able to create the record by clicking a button that is in the portal row and going directly to the contact database to fill in the info. Can I do this? or What I would really ike to do that would even be better would be to create a new portal record using a button that is located outside of the portal. I have seen this in other filemaker databases, but I don't know how to do it. Ideally, there would be a button outside of the portal that would say "add contact". When clicked, it would open a window from the contacts database to fill in the info. It would then show up in the portal. Any help would be appreciated.
Matt Klein Posted December 10, 2001 Posted December 10, 2001 Here's what you can do to get the second option to work: Write a script in the Contacts database that takes you to the layout you want to come up for the data entry and goes to the Last Record. I'll call it "Go to Data Entry". It should look like this: Go to Layout[DataEntryLayout] Go to Record/Request/Page[Last] Define a text field in the Contacts database that will be used just for record creation. I usually name it "CreationField". Then write a script in the Customers database that has the following steps(I am going to use FullName as the field name of the calculation field that shows up in your portal and Contacts as the relationship name used in the portal): Go to field[Contacts::FullName] Go to Portal Row[Last] Set Field[Contacts::CreationField, "Woohoo"] Go to Field[ ] Go to Related Record[show, Contacts] - make sure you select Show Only Related Records Perform Script[sub-scripts, External: Contacts] - this is where you tell Filemaker to run the Go to Data Entry script in the Contacts file. That should do it. Hope this helps.
danjacoby Posted December 12, 2001 Posted December 12, 2001 Another solution would be to have the fields for the "FirstName" and "LastName" situated directly behind the calculated "FullName" field in the portal. Then uncheck the "Allow entry..." for the "FullName" field and make the field white (or any color, just not transparent). Then, when you create a new record in the portal, you'll be able to enter First and Last names directly, but when you go to another field, all you'll see will be the calculated Full name.
Newbies skay Posted December 12, 2001 Author Newbies Posted December 12, 2001 Thanks MattSBCNE, I got a solution that was vvery similar from another BB. It works great. I appreciate the quick response.
Recommended Posts
This topic is 8383 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 accountSign in
Already have an account? Sign in here.
Sign In Now