Discussions

 View Only
  • 1.  How do you show an image on a form from a related table?

    Posted 04-13-2017 21:14
    I have a table _DBID_PROJECTS that contains projects. I have a separate table _DBID_DOCUMENT_REPOSITORY that contains various documents and photos with an attachment field (FID: 6) . The two tables are related - one project has many documents.

    My question is: How do I get a project image from the document repository table to display on a form in the projects table? I've tried a formula-text field, but the formula isn't working. Any help would be appreciated. 


  • 2.  RE: How do you show an image on a form from a related table?

    Posted 04-13-2017 21:23
    I just did this about 15 seconds before you asked the questions, what are the odds.

    You will need to decide which image you want to show and get that Record ID# summarized to the parent record.

    So if you have some qualifying field on the Documents table that says what type of file is attached, it will be much easier.

    Say you have document type of "Photo";  Create a summary field where you are summarizing the ""Minimum" Record ID#, with the condition that "Doc type" is equal to "Photo".

    Call it something like [Minimum Photo Record ID#]

    Then use this formula in your formula text field on the Projects table.

    "<img height=\"80\" src=\"" & URLRoot() & "up/" & [_DBID_DOCUMENT_REPOSITORY] & "/a/r" & [Minimum Photo Record ID#] & "/e6/v0\" />"


  • 3.  RE: How do you show an image on a form from a related table?

    Posted 04-14-2017 16:30
    Thank you, this is EXACTLY what I needed! Worked like a charm! I'd never created a summary field before, but it was pretty straightforward and easy. Thanks again!