Model Lookup w/ Multiple Aggregate Models

  • 1
  • Question
  • Updated 1 year ago
  • In Progress
I am trying to combine multiple aggregate models(task object) into one table via model lookup formula fields. The end goal is to have the main aggregate model display row data by user and have individual columns be the source of the other aggregate models (Image below). 
  • User entries are the main Task aggregate model.
  • Each Type column is a separate Task aggregate model


The Model Lookup formula I am using on Type A is as follows:
VALUE(MODEL_LOOKUP("TypeA","countId","createdByName",{{CreatedBy.Name}}))

This UI field for the main task model is returning no results.

If I modify the formula to: 
VALUE(MODEL_LOOKUP("TypeA","countId")) then I will see the first-row entry for TypeA displayed across all rows in my main task model. I've tried every combination for parameters 3 and 4, but nothing I do seems to make the models match up by the grouping field.

Column Task Model (Type A in this example) 


Main Task Model (User in this example)


Main Task Model Formula Field

Photo of Josef Lagorio

Josef Lagorio

  • 2,874 Points 2k badge 2x thumb

Posted 1 year ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Can you use a basic model for the main model and have it display lookups to the agg models... I remember running into some issues doing model lookups FROM aggregate models, but it slips my mind what the issue was.
Photo of Josef Lagorio

Josef Lagorio

  • 2,864 Points 2k badge 2x thumb
That's getting closer, but the table is repeating values.

(Edited)
Photo of Josef Lagorio

Josef Lagorio

  • 2,864 Points 2k badge 2x thumb
oh snap! I accidentally got it to work using an aggregate model as my main display. 

The 4th parameter of the lookup statement needed the alias name from the main model, not the field API name. Woot!
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Nice!
Photo of Don Souza

Don Souza, Employee

  • 1,160 Points 1k badge 2x thumb
Cool!
Photo of Don Souza

Don Souza, Employee

  • 1,160 Points 1k badge 2x thumb
Cool!