Jump to content
Sign in to follow this  
flyzone

Portal - Scripting Problem

Recommended Posts

Recently I built a DB using the FileMaker Business Tracker solution as a template. (I'm just at the beginning) but I can't solve a problem using a script on a portal.

This is the situation. On the "Company" layout I have a portal from the "Contact" table that display the name of people working for the company. My intention is to click on the contact name on the portal in order to get more details (phone, mail, email etc).

To do this I imported the script from the FM Business Tracker file and adapted it to my settings.

The Script works fine. The Contact Details windows open but the record displayed is always the first one from the contact list. I'm sure that some parameters are wrong but I can't figure out what due to my inexperience.

Hope someone can give me some suggestions.

Thanks,

Fly

cool.gif

Share this post


Link to post
Share on other sites

Make sure Go to Related Record [show only related, "yourrelationship] is the first step in your script before Commit Record or any other steps that take focus away from the portal.

Share this post


Link to post
Share on other sites

Thanks for your reply.

I tried to build a simple script using the Go to Related Record [show only related, "yourrelationship] but in this case the record that the new windows is showing is always the first one on the portal. So if I click on the third name the info for the first name on the portal will show up.

Fly

Share this post


Link to post
Share on other sites

Check your button dimensions to ensure they are within the first row of the portal.

Share this post


Link to post
Share on other sites

Check that the relationship in the GTRR step is the same as that of the portal. If that's not the problem either, stuff and attach your file for investigation.

Share this post


Link to post
Share on other sites

As I said, GTRR needs to be the first step. You're opening a new window first, so you lose your place on the Company layout and the first related record becomes the default. Instead, use the New window option in the GTRR step.

Share this post


Link to post
Share on other sites

Got it. Thank you so much for the help.

BTW what do you think about the file. What do u think I can improve.

I've been using FM (2 weeks) but I really love it smile.gif)

Fly

Share this post


Link to post
Share on other sites

It looks pretty good to me. I would suggest doing away with the Insert and Clear steps and using Set Field instead though.

Insert Current Date [Companies::Notes]

Insert Text [Companies::Notes; " - "]

Insert Current Time [Companies::Notes]

can be changed to

Set Field [Companies::Notes; Companies::Notes & Case( not IsEmpty(Companies::Notes);

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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