ModelLookup in UI field problems

  • 1
  • Question
  • Updated 2 months ago
  • Answered
I can’t figure this out. I have a situation where I have two models/objects whose records share a name. The standard Salesforce Name field for the records is exactly equal and there are the same number of records in both models. I need a UI only formula field to look up the record ID in The target model based on the Name field in the source model.
I made sure the models load in the correct sequence.
I made a sure the look up fields and return fields are in the models. Can anyone see what I am doing wrong? Is it because I am matching Name fields and they have special properties? Thanks for taking a peek!

MODEL_LOOKUP("OASRegistry","Id","Name",{{Name}})
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,510 Points 10k badge 2x thumb

Posted 2 months ago

  • 1
Photo of Mike Dwyer

Mike Dwyer, Champion

  • 4,184 Points 4k badge 2x thumb
I was able to make this work with test objects (with and without the quotation marks, by the way). I tried it first with two models on the same object, and that worked. I then created a dummy object and inserted one record. On that record, I changed the Name to match a Name from the original object. The formula did look up the Id from the original object using the Name from the dummy object.

Have you simply listed the contents (Name field, specifically) of each model and verified that the matching names are actually being included in the models? What about Limits on the models? Is the first model perhaps not retrieving the records that correspond to the records retrieved in the second model?
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,510 Points 10k badge 2x thumb
Thanks Mike. I didn’t think to try looking up the same model. Doing this allowed me to issolate the problem to the target model. It wouldn’t recognize Name on the target model. I deleted the model and recreated and now it works fine. Frustrating that I wasted so much time, but thankful for Skuid and the Community.