Forum Discussion

FilipGlisic's avatar
FilipGlisic
Qrew Member
3 years ago

How to lookup related records across tables and concatenate/combine the lookup outputs?

Hello,

I am trying to create a single summary table that combines/concatenates related data from 3 separate data tables ("Risks", "Controls", "Treatments").

The relationship between the tables is:
  • each "Risks" has multiple "Controls"
  • each "Risks" has multiple "Treatments"

Is there a way I can create a new summary table that shows each "Risks" and for each "Risks" looks up and combines/concatenates/nests all related "Control" into a single field? (and similarly for each all related "Treatments") - please see example layout below.

"Risk" Field "Control" Field "Treatment" Field
R1.1 R1.C1.1 R1.T1.1
R1.C1.2 R1.T1.2
R1.C1.3 R1.T1.3
  R1.T1.4

Appreciate any assistance, Thanks!



------------------------------
Filip Glisic
------------------------------

3 Replies

  • Obviously you are aware that you can be sitting on a single risk record on a form and see the embedded tables for the Controls and treatments.

    If you want to get a similar effect but on a report, one solution would be to create a combined text summary field of the Controls to summarize the Control up to Risks.  Then do the same with the Treatments.

    I do not like the appearance of the combined text summary field which kind of looks like bubbles, they can be changed to be looking like normal text with an easy formula field.

    That is not what you were looking for can you better describe an example of the result table that you are looking for using your data above.


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • FilipGlisic's avatar
      FilipGlisic
      Qrew Member
      Thanks Mark, yes the embedded table as seen for a single record, but shown within a report is exactly right.

      The combine text summary field worked great for most cases, but the issue I have is when I summarise multiple "control" fields to pull across to the "risk" report, as they are summarised, they lose the 1-1 relationship (as values are summarised, and combine text summary seems to rearrange in alphabetical order).

      For example it will combine the field "controls" (as they are unique values being summarised) and be able to pull this across to the "risk" report as a combined text summary field.
      But when I try to also pull across the "controls" respective owners (which includes duplicated names) it summarises the names to unique values (and rearranges in alphabetical order) - so then the "controls" and their respective owners pulled across aren't shown embedded 1-1 within the "risk" report.

      Any ideas if it is possible to work around this or achieve something similar? I have added below example of what I am trying to achieve.

      "Risks" "Controls" "Control owner"
      Record 1 C1 Owner 1
      C2 Owner 1
      C3 Owner 2
      C4 Owner 2
      C5 Owner 3

      Thanks

      ------------------------------
      Filip Glisic
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion
        I suggest that you make a field on the controls child record which concatenate dups the Control witch the Owner. 

        List ("-", [Control], [Owner])

        Then make your combined text Summary in that field. That way the Owners will stay associated with the Control.

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------