Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Here is the setup:

I have two data bases we will call one main and the another customer.

I have a portal in the main database that shows all customers relating to a field that I have. This works great.

I would like to be able to click on a Customers Name (in the portal) and have a script or something open the customers database and go to the realted customer that I have clicked on.

Tha reason I have to do this is the portal would have to be so large to show all of the information I want to see...So I thought That I could do this to bring up more information.

Can anyone help...

Posted

Create a script in Main with the following:

Set Field(gPortalRow, status(currentportalrow)) gPortal row is a global number

GoToPortalRow(By field Value, gPortalRow)

Go To Related Record(enter the portal relationship here)

Go To Layout(whichever layout you want)

The first two steps may not be absolutely essential but I always do it to ensure that I know exactly where I am pointing, as I have seen it fail sometimes.

Attach this script to the customer field in the portal row. I usually also color this field a blue color so that it is obvious that it is a link. You may also want to underline it.

When the user clicks the customer field in browse mode, they will be taken directly to the Customers table, to the appropriate record.

Posted

"I would like to be able to click on a Customers Name (in the portal) and have a script or something open the customers database and go to the realted customer that I have clicked on."

1. Going to a related record is what the "Go to Related Record" script step does.

2. It is very common practice to take another approach that allows you to stay in the same file. You create a global field, gCustomerID; and you create a new relationship which relates this to CustomerID. Your button in the portal is attached to a script that performs the action, set field (gCustomerID, "Customers::CustomerID")

You then display the data from this relation above or below the portal. So the portal rows stay slim, but you can use a button to view the detail of the selected customer record.

Posted

which one would you do...stay in the same file or open another file...please remember I will have lots of customers each one with many related files...

Thank you

Posted

Can you explane this a little more...Sorry I tried to do it but it did not work...Do you have any example of this...Its is always easer to learn if I can see it...

Thank you...

Posted

Joseph31 said:

which one would you do...stay in the same file or open another file...please remember I will have lots of customers each one with many related files

The number of customers doens't matter. You're already happy with selecting one from a portal, so there won't be any difference. Regarding stay or move to other file, I 'd have to know more about the detail. But I'd probably stay in the same file, though perhaps with a tabbed layout. The statement "lots of customers with many related files" is unclear. It would be helpful if you could describe more of what this file really does. What is the "Main" file about and what customer information do you need to see? Also, why two files? Your SIG says you are using FileMaker 7 so you can do it in one file two tables.

See attached EXAMPLE file.

Example.zip

Posted

Thanks,

I have received the example...I have looked at it...it does alot of what I want todo...thank you.. The one item I need is a script to add a new policy to the portal... the example you gave me is great for switching and seeing already added policies...works great...But I would like a button that I can hit that will bring up the policy window...with the correct relation to the customer I was on...Is this hard?

thank you

Posted

Can you point me in the correct direction...I have read alot of different books on the issure...and I am just really confused on how to do this...

That is makeing a script that can bring up a new record in a different table...but still keeping the recordID the same as the page I was on prevously... This Way I can add a policy to a person very easly....

Thank you

Posted

What you want to do is to *create* a new policy record for this customer, right? (It's confusing to say that you want the new record to have "the same recordID"; the customerID is the key to the relationship,but the policyID for the new record should be generated separately, right? (Usually "RecordID" refers to a number that's unique for the table in question.)

First, make sure that the relationship is set up to allow creation of new records in the related file (or related table, in FM7).

Then, notice you should be able to type directly into the empty row immediately under the last portal row with existing records. Given the solutions discussed in previous posts, you can then use your existing button to show details for that policy in a "magnifying glass" portal, or in a separate window...

If that goes well, you can set up a script procedure to copy the customer ID and then go to the related table (or file) and create a new record, going to the customer field and pasting the customer ID there.

Posted

...ok what you said makes sense...I have tried global Fields with the set field option...but I am having no luck...it goes to the page I want correctly...even starts a balnk form like I want...but it does not carry over the customerID for me...I can type it in but I really want something that will do it for me

Thanks for your response

Posted

In the main file, put the customerID into a global field -- use Set Field(). Then, after your script creates the new, blank form (i.e. a new related record), put the contents of the global field into the customerID field of the new record -- again, use Set Field().

Posted

I am working through the example.fm7 to learn how to make a "magnifying glass" portal. I have noticed that the find features built into FM no longer work. I am making the assumption that it is because my default table for the layout is now main and not vehicle. Also the fields are now pointed to vehicle2 the second instance of the vehicle table on the graph. Do I need to script some extra stuff to find now?

Posted

Thanks for the help...That worked

I now have a working relationship or tables...you know what I mean... Thank you for your effort...

Joseph

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