FM - Creating a List of Document via Container Field
Posted on 2011-02-22
I asked this in a previous question, but, to be fair, it should be completely separate (not an aspect of my original question): How can you create a list of documents that dynamically show depending on what record you are on. Here is ChallengeDay's response with my followup question:
Sure, you could have a Document table, with a foreign key to tenants (or properties, or however you want to structure), so that for each tenant you could show a list of related documents in a portal. In the document have a field that calculates the filepath, with GetAsText ( FileContainer ). Then the portal shows all of the documents and their filepaths. Then if someone clicks on the icon of the file it opens it right up. (Files have to be stored as references for this scheme to work.)
This is really cool and seems straightforward enough (I'm very comfortable with portals and related tables), but I'm drawing a blank on what GetAsText (FileContainer) has to do with this.