What is the default return value for MODEL_LOOKUP if the row is not found in the model it’s searching? I’m trying to write a condition for the row not being found in a model.
Is this for a formula? I think you can use something like
IF(ISBLANK(MODEL_LOOKUP(“Opportunity”,“AccountId”,“AccountId”,{{Id}})),iftrue,iffalse)
If it fails to find a matching AccountId matching the Id in my main model, then it’ll do iffalse. If it successfully finds it, then it’ll do iftrue. Iftrue will probably be the model lookup you actually wanted to do, like if I wanted the oppty amount it would be MODEL_LOOKUP(“Opportunity”,“Amount”,“AccountId”,{{Id}}))
Thank you this works!
Another question – If there are multiple matching rows in the MODEL_LOOKUP, what happens? Does it just return the first row found?
I think I figured it out – It looks like it returns the first row found.
Yeah that makes sense - if you do a modellookup without criteria it just returns the first row of the model.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.