Jump to content

Go to ONE related record of several from a portal


Courtney
 Share

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

Recommended Posts

I feel I'm surely overlooking something obvious here, but I can't figure it out.

I'm uploading a sample file which is actually one of the starter solutions from FM12. I've added a layout "Popup - View Attachment", and a script "Popup - View Attachment". :)

I have a button on the Tasks Details layouts, Attachments tab to run my script.

I add two attachments, each a PDF file.

What I'm aiming for is to click that button and have ONLY the one record I'm selecting from appear in the new layout via my script.

What I'm getting is both related records opening. How can I narrow it to only the record that I click the button from? (Can I?)

Tasks.fmp12

Link to comment
Share on other sites

I'm on PC - when I click the first PDF, it appears OK, because that's the record it shows in the popup layout.

If I click the second PDF, it still shows me the first PDF.

In either case, I can use the keyboard shortcuts to go to previous and next record to see all the related records.

Link to comment
Share on other sites

Oh, I see what you are saying, both are going to attachment 1, and the second record is not seeing the second one? 

 Both attachments have the same number. shouldn’t the second one be 2?

Link to comment
Share on other sites

Unfortunately, this example file does not put primary keys (ID fields) in every table.

There SHOULD be an attachment ID field in the Attachments table.

Then, your script could be set up to perform a find for the attachment ID of the record you clicked.

TasksMOD.fmp12

Link to comment
Share on other sites

Thanks Bruce - that was the conclusion I was coming to as well. I just thought there might be a more simple way to "open this record I'm clicking on in the portal in its own window".

Link to comment
Share on other sites

This topic is 2278 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
 Share

×
×
  • Create New...

Important Information

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