add sum fields from different models in U-I Field

Hmm, yeah. Not helpful.

Not sure what to tell you. Perhaps skuid can take a look under the hood at what’s causing the error.

Alternatively, you can try reverting to a page version that doesn’t have the error, to try to isolate what change caused the problem.

Oooh so much code. So much help.

Enclosed below is some page XML for a test jig. It adds together the count of leads and contacts in your org.

  • The first set of models do this addition for aggregate models that have NO grouping. This is the easy solution (and is what I read you are trying to do above)
  • The second set of models do this addition for models that DO Have grouping (but the blank values in the grouping field have been removed). Here the "roll up" grouping method is critical.
Run this test page in your org and let me know what happens. Oh btw - what version of skuid are you on?
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true"> <models> <model id="leads" limit="" query="true" createrowifnonefound="false" adapter="" type="aggregate" sobject="Lead"> <fields> <field id="Id" name="countId" function="COUNT"/> </fields> <conditions/> <actions/> <groupby method="simple"/> </model> <model id="contact" limit="" query="true" createrowifnonefound="false" adapter="" type="aggregate" sobject="Contact"> <fields> <field id="Id" name="countId" function="COUNT"/> </fields> <conditions/> <actions/> <groupby method="simple"/> </model> <model id="UIOnlyModel" limit="1" query="true" createrowifnonefound="false" adapter="" type="" sobject="User"> <fields> <field id="TotalNonGroupedPeople" uionly="true" displaytype="FORMULA" label="Total People" readonly="true" returntype="DOUBLE" precision="9" scale="2"> <formula>VALUE({{$Model.leads.data.0.countId}})+VALUE({{$Model.contact.data.0.countId}})</formula> </field> <field id="TotalGroupedPeople" uionly="true" displaytype="FORMULA" readonly="true" returntype="DOUBLE" precision="9" scale="2" label="Grouped People"> <formula>MODEL_LOOKUP("leadsByCat","countId","leadSource",null)+MODEL_LOOKUP("contactByCat","countId","leadSource",null)</formula> </field> </fields> <conditions> <condition type="userinfo" value="" field="Id" operator="=" enclosevalueinquotes="true" userinfotype="userid"/> </conditions> <actions/> </model> <model id="leadsByCat" limit="" query="true" createrowifnonefound="false" adapter="" type="aggregate" sobject="Lead"> <fields> <field id="Id" name="countId" function="COUNT"/> </fields> <conditions> <condition type="blank" value="null" field="LeadSource" operator="!=" enclosevalueinquotes="false"/> </conditions> <actions/> <groupby method="rollup"> <field id="LeadSource" name="leadSource"/> </groupby> </model> <model id="contactByCat" limit="" query="true" createrowifnonefound="false" adapter="" type="aggregate" sobject="Contact"> <fields> <field id="Id" name="countId" function="COUNT"/> </fields> <conditions> <condition type="blank" value="null" field="LeadSource" operator="!=" enclosevalueinquotes="false"/> </conditions> <actions/> <groupby method="rollup"> <field id="LeadSource" name="leadSource"/> </groupby> </model> </models> <components> <pagetitle model="leadsByCat" uniqueid="sk-6HYX4-419"> <maintitle>Aggregate Models With NO Groupings</maintitle> <actions/> </pagetitle> <panelset type="custom" uniqueid="sk-6Ggxz-261" scroll=""> <panels> <panel width="33.3%"> <components> <skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="all" createrecords="false" model="leads" buttonposition="" mode="readonly" uniqueid="sk-6Gl2C-280" emptysearchbehavior="query"> <fields> <field id="Id" name="countId" valuehalign="" type=""> <label>Leads</label> </field> </fields> <rowactions/> <massactions usefirstitemasdefault="true"/> <views> <view type="standard"/> </views> <searchfields/> </skootable> </components> </panel> <panel width="33.3%"> <components> <skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="all" createrecords="false" model="contact" buttonposition="" mode="readonly" uniqueid="sk-6Gla9-292" emptysearchbehavior="query"> <fields> <field id="Id" name="countId" valuehalign="" type=""> <label>Contacts</label> </field> </fields> <rowactions/> <massactions usefirstitemasdefault="true"/> <views> <view type="standard"/> </views> <searchfields/> </skootable> </components> </panel> <panel width="33.3%"> <components> <skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="all" createrecords="false" model="UIOnlyModel" buttonposition="" mode="readonly" uniqueid="sk-6Gfer-249" emptysearchbehavior="query"> <fields> <field id="TotalNonGroupedPeople" decimalplaces="" valuehalign="" type=""/> </fields> <rowactions/> <massactions usefirstitemasdefault="true"/> <views> <view type="standard"/> </views> <searchfields/> </skootable> </components> </panel> </panels> </panelset> <pagetitle model="leadsByCat" uniqueid="sk-6Hfs1-430"> <maintitle>Aggregate Models With Groupings</maintitle> <actions/> </pagetitle> <panelset type="custom" uniqueid="sk-6HlpW-436" scroll=""> <panels> <panel width="33.3%"> <components> <skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="all" createrecords="false" model="leadsByCat" buttonposition="" mode="readonly" uniqueid="sk-6HpTk-451" emptysearchbehavior="query"> <fields> <field id="LeadSource" name="leadSource"/> <field id="Id" name="countId"/> </fields> <rowactions/> <massactions usefirstitemasdefault="true"/> <views> <view type="standard"/> </views> <searchfields/> </skootable> </components> </panel> <panel width="33.3%"> <components> <skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="all" createrecords="false" model="contactByCat" buttonposition="" mode="readonly" uniqueid="sk-6Hpuo-457" emptysearchbehavior="query"> <fields> <field id="LeadSource" name="leadSource"/> <field id="Id" name="countId"/> </fields> <rowactions/> <massactions usefirstitemasdefault="true"/> <views> <view type="standard"/> </views> <searchfields/> </skootable> </components> </panel> <panel width="33.3%"> <components> <skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="all" createrecords="false" model="UIOnlyModel" buttonposition="" mode="readonly" uniqueid="sk-6JBLP-647" emptysearchbehavior="query"> <fields> <field id="TotalGroupedPeople" decimalplaces="" valuehalign="" type=""/> </fields> <rowactions/> <massactions usefirstitemasdefault="true"/> <views> <view type="standard"/> </views> <searchfields/> </skootable> </components> </panel> </panels> </panelset> </components> <resources> <labels/> <javascript/> <css/> </resources> <styles> <styleitem type="background" bgtype="none"/> </styles> </skuidpage>