Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Multiple container records on a single parent record

Featured Replies

 
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

CapturePDFupload.PNG

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.

 

  • 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;)

child example (2).zip

 

Their are other ways to do this and choice of how should be driven by the use case.

Edited by Kris M

  • 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

  • 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

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.