May 7, 201510 yr Post: Hi there I have a scenario where I want to be able to upload multiple PDFs against a single parent record and then select which one is viewed. I'm using a portal of the container table with the InsertFile script step to easily allow a user to add PDFs against a parent - that's not so much the issue. However, I'm struggling to come up with a way to view/(stream) a given PDF as obviously they will not view live from a portal, only from a field placed directly on the layout, but the user instinct and therefore best use case is to select from the file manager portal I've built. From the attached image, the right hand side shows container ID 11, which is document 1. How can I have this change at the user's request to show container ID 12 or ID 13 which would in turn populate the viewing field with document 2 or document 3 respectively? Thanks in advance
May 7, 201510 yr You could create a script that gets the portal rows primary key of the child record and puts it into a global field in the parent table and attach it to a button in the portal. Then make a join on the relationship graph that goes from the global parent to the child primary key. Place a container field on the layout for the pdf from the child record across this relationship and youll display just the selected pdf.
May 7, 201510 yr Author Kris I've gotten as far as grabbing the global variable of the child record but wasn't sure how to use it. This looks like a great idea, thanks for your help
May 7, 201510 yr child example (2).zip Their are other ways to do this and choice of how should be driven by the use case. Edited May 7, 201510 yr by Kris M
May 7, 201510 yr Author Kris, Thanks for your help on this, I've got the relationships and variables set up. I'm struggling on a daft point and hate to ask further... I have 600 parent records with the PK_ID commencing at 1000. On my script, I've gathered the portal row's PK ($$Variable 11) but I'm struggling to place it correctly on the parent field. The trouble I'm having is putting the $$Variable on the right record on the parent table. I've tried GotoRecord but FM will obviously look at the found set (600 records) and navigate through there. It doesn't look at the PK_ID (which in this case is 1010). So, how do I get PK_ID's record updated with the $$variable 11? Thanks
May 7, 201510 yr Author Thanks for your help Kris, I've managed to script this, but still on the same relationship model you've suggested.
Create an account or sign in to comment