# Issue with Model Lookup

Dave
Member ✭✭

Hi Having issues building a Formula with model lookup from another Agg Model

Here's my scenario:

I have 2 Aggregate Models: 1 Named 'TimesheetentryAgg' the other named: 'FundingAgg'

I want to use the result UI Field from 'TimesheetentryAgg' named 'TotalPaid' (this ui field is a formula field adding 2 Sum aggregations) for a calculation on model: 'FundingAgg'

So on 'FundingAgg' i created a UI Only field with this formula , just to see if value would show:

MODEL_LOOKUP("timesheetEntryAgg","TotalPaid")

And field return empty.

Note that the order of model load is correct, Timesheet is loaded before Funding

As well did not add 3rd and 4th optional parameter to model lookup formula , as from what i read on training guide, not always necessary and if i understood correctly an Agg model only has 1 row? and needed to use not sure what i can use as these 2 models have not much in common...

I would appreciate any help

Thx

Here's my scenario:

I have 2 Aggregate Models: 1 Named 'TimesheetentryAgg' the other named: 'FundingAgg'

I want to use the result UI Field from 'TimesheetentryAgg' named 'TotalPaid' (this ui field is a formula field adding 2 Sum aggregations) for a calculation on model: 'FundingAgg'

So on 'FundingAgg' i created a UI Only field with this formula , just to see if value would show:

MODEL_LOOKUP("timesheetEntryAgg","TotalPaid")

And field return empty.

Note that the order of model load is correct, Timesheet is loaded before Funding

As well did not add 3rd and 4th optional parameter to model lookup formula , as from what i read on training guide, not always necessary and if i understood correctly an Agg model only has 1 row? and needed to use not sure what i can use as these 2 models have not much in common...

I would appreciate any help

Thx

Tagged:

2

## Comments

I tried this in my developer org. that is on Skuid 10.0.4. What you are trying to do works. I have included my XML that does a count of tasks by WhoId and calculates a percentage.

In looking at your post, I noticed that in your 3rd paragraph your model name is 'TimesheetentryAgg'.

In your 5th paragraph, you show your model lookup as MODEL_LOOKUP("timesheetEntryAgg","TotalPaid").

Notice that the 't' in your model lookup is NOT capitalized. That may be your problem. I would verify that your first model has a row in it and then carefully check that your model name and model field in your model lookup UI field match your first aggregate model.

Thanks,

Bill

Thank you for your help.

Unfortunately the typo was in post only... i wrote it in a hurry , sorry

I looked at your example, ty for providing it and it seems liek u said i'm doing things correctly.

So still cannot figure out issue

So here's SS from every step , maybe it will help?

I'm not very good at working with console, but trying to lookup model to see if UI field has value , but do not see it at all there (is it normal?)

Thank you!

Instead of just looking at the builder page, I decided to test your page Bill, once i made some changes on it to work on my org

and realized it did not return results as well....

You mentioned u tested it on 10.0.0.4 , so tested it on my sandbox on which i was testing latest version and it worked!

My Production org is still under 8.15.14 ... not sure why it's not working on this version, but in case someone has same issue, here's the answer

Don't put off too long updating skuid like me (i try to not update too often as it takes me a lot of time to test all of our pages and other items that uses skuid to make sure no crucial bug and all working as it should , hope SF allows rollbacks soon!)

Does anyone know if this is a new feature that came in after 8.15 version?

Thx