Issue with Model Lookup

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:

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



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.



<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true">
        <model id="TotalTasks" limit="" query="true" createrowifnonefound="false" datasource="salesforce" type="aggregate" sobject="Task">
                <field id="Id" name="countIdTask" function="COUNT"/>
            <groupby method="simple"/>
        <model id="TasksByWhoId" limit="" query="true" createrowifnonefound="false" datasource="salesforce" type="aggregate" sobject="Task">
                <field id="Id" name="countIdWho" function="COUNT"/>
                <field id="Percentage" uionly="true" displaytype="FORMULA" label="Percent of Total" ogdisplaytype="TEXT" readonly="true" returntype="PERCENT" precision="3" scale="2">
            <groupby method="simple">
                <field id="WhoId" name="whoId"/>
                <field id="Who.Name" name="whoName"/>
        <pagetitle model="TotalTasks" uniqueid="sk-3wyOpP-175">
            <maintitle>Total Tasks:  {{$}}</maintitle>
        <skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" alwaysresetpagination="false" createrecords="false" model="TasksByWhoId" buttonposition="" mode="readonly" allowcolumnreordering="true" responsive="true" uniqueid="sk-3wyj7V-226">
                <field id="Who.Name" name="whoName" hideable="true" uniqueid="fi-3wykkT-236"/>
                <field id="Id" name="countIdWho" hideable="true" uniqueid="fi-3wykkT-237" valuehalign="" type="">
                    <label>Number of Tasks</label>
                <field id="Percentage" hideable="true" uniqueid="fi-3wz8Vf-402" decimalplaces="" valuehalign="" type=""/>
            <massactions usefirstitemasdefault="true"/>
                <view type="standard"/>
        <styleitem type="background" bgtype="none"/>

Hi 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 :frowning:

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!

I found the culprit!

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 , 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 :smiley: (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?