March 30, 20169 yr 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
March 30, 20169 yr Author 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.
March 30, 20169 yr 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?
March 30, 20169 yr Author They aren't numbered in this file - you may be looking at the Task ID Match number which designates which task they are linked to.
March 30, 20169 yr 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
March 30, 20169 yr I placed the ids of task and attachments on both layouts to see what related record numbers were being shown.
March 30, 20169 yr Author 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".
Create an account or sign in to comment