add sum fields from different models in U-I Field

BillBill ✭✭
edited May 12 in Questions
I want to total the sum fields from 2 models in a U-I Field.
The first aggregation
image
The second aggregation
image
My U-I field
image
Is my formula wrong?

Comments

  • Matt SonesMatt Sones ✭✭
    edited February 2017
    Bill,

    Your formula is adding the first rows of the aggregate models together. If your groupings are rollup, then you need to access the LAST rows of those models to get the SUM of each.

    This is a little tricky, but if you have a 'category' field on each model, you can access if with something like this:

    MODEL_LOOKUP("Member_DNA_Point_Tracker", "YourGroupingField", "sumPointsc", null)

    Just going by memory here. I may have gotten the two middle arguments backwards... check the documentation to be sure.
  • BillBill ✭✭
    edited May 12
    I am not sure this matter, but I have no groupings just a count for how many there are for 1 field "Points" in each model)  To test I have the fields like this
    image
    It shows like this:
    image

    Which is correct.  So, cannot figure how to add the single field in each model together.
  • Matt SonesMatt Sones ✭✭
    edited February 2017
    Bill,

    You can test your global merge syntax the same way.

    Make sure you have your formula set to return a number.
  • BillBill ✭✭
    edited May 12
    I did not have it as a number. If I do not want to do any addition and just want to get that 1 field from the Member_DNA_Point Tracker.

    I have tried this

    {{$Model.Member_DNA_Point_Tracker.sumPointsc}}

    and this

    {{$Model.Member_DNA_Point_Tracker.data.sumPointsc}}

    and this

    {{$Model.Member_DNA_Point_Tracker.data.0.sumPointsc}}

    and this

    {{$Model.Member_DNA_Point_Tracker.0.sumPointsc}}
  • Matt SonesMatt Sones ✭✭
    edited February 2017
    Bill,

    Put the third in a rich text component and see if it displays the right value in runtime:
    {{$Model.Member_DNA_Point_Tracker.data.0.sumPointsc}}
  • BillBill ✭✭
    edited May 12
    Ok.  I did this:
    image
    and I got this
    image
    Which is correct.
    But now what?
  • edited January 2017
    I found that you need to include the merge fields in VALUE(xxx) for this to work.
    Try VALUE(xxx) + VALUE(yyy).  
    ABS(xxx) + ABS(yyy) would also work.
    If that doesnt work, try VALUE(VALUE(xxx)+VALUE(yyy))
  • BillBill ✭✭
    edited May 12
    I will try this.  Does the model that does the addition need to be below the model fields being added?
  • edited January 2017
    Don't think so.
  • BillBill ✭✭
    edited May 12
    Does not work. Any other ideas?
  • Matt SonesMatt Sones ✭✭
    edited February 2017
    Bill,

    I think Mansour is right.

    Just to confirm, your formula now looks like this?
    VALUE({{$Model.Member_DNA_Point_Tracker.data.0.sumPointsc}}) + VALUE({{$Model.Person_Point_Tracker.data.0.sumPointsc}})
  • BillBill ✭✭
    edited May 12
    Yes. That is the formula.  However, when preview with that formula intact the screen show blank  I have created a video just to confirm I have everything correct.
    https://drive.google.com/file/d/0B409lhd9sYDcR2dVUHR5VXVhdzA/view?pli=1
  • edited January 2017
    Just tried it on my end, looks like a bug if you ask me.  This used to work and is now not working anymore.  Rob, Zach any ideas?
  • Matt SonesMatt Sones ✭✭
    edited February 2017
    Bill,

    Do you have any console errors? That's always the first thing I check with a blank screen.
  • BillBill ✭✭
    edited May 12
    Here is the console error
    image

  • Matt SonesMatt Sones ✭✭
    edited February 2017
    What code is the error coming from?

    If you reload the page with your console open, you should be able to expand the error and see the call stack. On the right side of the console, you'll see what the source and line number of the code the call is coming from.
  • BillBill ✭✭
    edited May 12
    What should I click on here?
    image
  • Matt SonesMatt Sones ✭✭
    edited February 2017
    The last link... that will show you the part of the code on your page that is triggering the problem (line 73 of your page).
  • BillBill ✭✭
    edited May 12
    I have no idea what to do with line 73 code:


    skuid.component.factory({"element": "#sk-page-a04j000000APlCFAA1-cmp-1447353646944-1","xmlDefinition": '<skuidpage unsavedchangeswarning="yes" showsidebar="false" showheader="false" tabtooverride="Member_DNA__c" personalizationmode="server" theme="FOXmls" modstamp="1447353613000" name="R_Detail_Member_DNA" pageid="a04j000000APlCFAA1" uniqueid="sk-page-a04j000000APlCFAA1-cmp-1447353646944-1"><components><grid uniqueid="sk-21ZFJm-294"><divisions><division behavior="fit" verticalalign="top"><components><pagetitle model="Mem_Referred_To_Missing" uniqueid="sk-3q4C4J-121"><actions><action type="multi" label="Add Member" icon="ui-silk-user-add"><actions><action type="blockUI" message="Loading . . ." timeout="1000"/><action type="showPopup" window="blank" url="https://dorothy--skuid.na16.visual.force.com/apex/skuid__ui?page=R_Add_Member_DNA"><popup title="" width="90%"><components><grid uniqueid="sk-2Gqhg7-1124"><divisions><division behavior="flex" minwidth="100px" ratio="1" verticalalign="top"><components><includepanel type="skuid" uniqueid="sk-2GqjfY-1130" pagename="R_Add_Member_DNA" module=""/></components></division></divisions><styles><styleitem type="background" bgtype="none"/></styles></grid></components></popup></action></actions></action><action type="multi" label="Log CR" icon="sk-icon-file-view"><actions><action type="showPopup"><popup title="" width="90%"><components><grid uniqueid="sk-2qqJ4o-1201"><divisions><division behavior="fit" verticalalign="top"><components><pagetitle model="Mem_CR_Open_Member_Add_Task" uniqueid="sk-2qscap-1561"><actions><action type="multi" label="Cancel" icon="sk-icon-cancel"><actions><action type="blockUI" message="Canceling . . ." timeout="1000"/><action type="emptyModelData"><models><model>A_Temp_CR_Add_Task__c</model></models></action><action type="closeTopmostPopup"/><action type="unblockUI"/></actions></action></actions></pagetitle></components></division></divisions><styles><styleitem type="background" bgtype="none"/></styles><renderconditions logictype="and"><rendercondition type="multiple" operator="not in" fieldmodel="Edit" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Reset" value="" enclosevalueinquotes="true"><values><value>EventAdd</value><value>EmailAdd</value></values></rendercondition></renderconditions></grid><wrapper uniqueid="sk-2qqN2n-1215"><components><tabset rememberlastusertab="false" defertabrendering="true" uniqueid="sk-2qqO-G-1223" renderas="radio"><tabs><tab name="Reset"><components/><oninitialshowactions/><onshowactions><action type="emptyModelData"><models><model>A_Temp_CR_Add_Task__c</model></models></action><action type="updateRow" fieldmodel="Edit" field="Reset" enclosevalueinquotes="true" value="Reset"/></onshowactions><renderconditions logictype="and"/></tab><tab name="Wiki" loadlazypanels="true"><components><pagetitle uniqueid="sk-2qqlOx-1284" model="Edit"><actions><action type="multi" label="Save Wiki and Close" icon="sk-icon-save"><actions><action type="blockUI" message="Saving . . ." timeout="2000"/><action type="save" rollbackonanyerror="true"><models><model>A_Temp_CR_Add_Task__c</model></models><onerroractions><action type="blockUI" message="There was an error" timeout="3000"/></onerroractions></action><action type="closeTopmostPopup"/><action type="requeryModel" model="Member" behavior="standard"><onerroractions><action type="blockUI" message="There was an error" timeout="3000"/></onerroractions></action><action type="requeryModels" rollbackonanyerror="true" behavior="standard"><models><model>Mem_Relation_Person</model><model>Mem_Relation_Org</model><model>Mem_License_Person</model><model>Mem_License_Org</model><model>Mem_Phone</model><model>Mem_Email</model><model>Mem_Social</model><model>Mem_Referred</model><model>Mem_CR_Open_Member</model><model>Mem_CR_Open_Member_Contact_Record</model><model>Mem_CR_Open_Person</model><model>Mem_CR_Open_Location</model><model>Mem_CR_Open_Organization</model><model>Mem_CR_Closed_Member</model><model>Mem_CR_CLosed_Person</model><model>Mem_CR_Calendar</model><model>Mem_Opportunities</model><model>Mem_Opportunities_Organization</model><model>Mem_Opportunities_Location</model><model>Mem_Opportunities_Person</model><model>Mem_Engagement</model><model>Mem_Engagement_Organization</model><model>Mem_Engagement_Location</model><model>Mem_Engagement_Person</model><model>Mem_Offer_Member</model><model>Mem_Offer_Organization</model><model>Mem_Offer_Location</model><model>Mem_Offer_Person</model><model>Mem_Documents</model><model>Phones_Chatter</model><model>Member_DNA_List</model><model>Location_List</model><model>Summary_Location_List</model><model>Mem_People_at_Location</model><model>Mem_People_at_Organization</model><model>Mem_Location_at_Organization</model><model>Mem_Members</model><model>Mem_Contact_Record_Results</model></models></action><action type="updateRow" fieldmodel="Edit" field="Reset" enclosevalueinquotes="true"/><action type="unblockUI"/></actions></action></actions></pagetitle><richtext multiple="false" uniqueid="sk-2qqm_g-1290"><contents>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;color: rgb(102, 0, 153); font-family: &apos;comic sans ms&apos;, cursive; font-size: 14px; font-weight: bold;&quot;&gt;Type Wiki&lt;/span&gt;&lt;/p&gt;
    </contents></richtext><basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="A_Temp_CR_Add_Task__c" buttonposition="" uniqueid="sk-2qqoLC-1295" mode="edit" layout="above"><columns><column width="100%"><sections><section title="Section A" collapsible="no" showheader="false"><fields><field id="Temp_Call_Results__c" showhelp="false" valuehalign="" type="" required="true" displayrows="10"><label/></field><field id="Temp_CR_Member_DNA__c" showhelp="true" valuehalign="" type="" readonly="true" optionsource=""><label>Member</label><searchfields/></field><field id="Temp_Assigned_To__c" showhelp="true" valuehalign="" type=""><label>Assigned to</label></field></fields></section></sections></column></columns></basicfieldeditor><basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="A_Temp_CR_Add_Task__c" buttonposition="" uniqueid="sk-2qz2RU-2365" mode="readonly"><columns><column width="100%"><sections><section title="Footprint" collapsible="collapsed"><fields><columns layoutmode="fixed"><column width="50%"><sections><section title="New Section" collapsible="no" showheader="false"><fields><field id="Temp_Completed_By_User__r.View_Name__c" valuehalign="" type=""><label>Completed by</label></field><field id="Temp_Type__c" showhelp="true" valuehalign="" type=""><label>Type</label></field></fields></section></sections></column><column width="50%"><sections><section title="New Section" collapsible="no" showheader="false"><fields><field id="Temp_Completed_Date_Time__c" valuehalign="" type=""><label>Completed</label></field><field id="Temp_Status__c" valuehalign="" type=""><label>Status</label></field></fields></section></sections></column></columns></fields></section></sections></column></columns></basicfieldeditor></components><oninitialshowactions/><onshowactions><action type="updateRow" fieldmodel="Edit" field="Reset" enclosevalueinquotes="true" value="Wiki"/><action type="emptyModelData"><models><model>A_Temp_CR_Add_Task__c</model></models></action><action type="createRow" model="A_Temp_CR_Add_Task__c" appendorprepend="prepend" defaultmodefornewitems="edit"><defaults><default type="fieldvalue" field="Temp_Completed_By_User__c" enclosevalueinquotes="true" value="{{$User.userId}}"/><default type="fieldvalue" field="Temp_Completed_Date_Time__c" enclosevalueinquotes="false" value="TODAY"/><default type="fieldvalue" field="Temp_Status__c" enclosevalueinquotes="true" value="Completed"/><default type="fieldvalue" field="Temp_Type__c" enclosevalueinquotes="true" value="Wiki"/></defaults></action></onshowactions><renderconditions logictype="and"><rendercondition type="fieldvalue" operator="!=" fieldmodel="Edit" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Reset" value="Task" enclosevalueinquotes="true"/><rendercondition type="fieldvalue" operator="!=" enclosevalueinquotes="true" fieldmodel="Edit" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Reset" value="Event"/><rendercondition type="fieldvalue" operator="!=" enclosevalueinquotes="true" fieldmodel="Edit" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Reset" value="Email"/><rendercondition type="fieldvalue" operator="!=" enclosevalueinquotes="true" fieldmodel="Edit" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Reset" value="Text"/><rendercondition type="fieldvalue" operator="!=" enclosevalueinquotes="true" fieldmodel="Edit" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Reset" value="EventAdd"/><rendercondition type="fieldvalue" operator="!=" enclosevalueinquotes="true" fieldmodel="Edit" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Reset" value="EmailAdd"/></renderconditions></tab><tab name="Task" loadlazypanels="true"><components><pagetitle model="A_Temp_CR_Add_Task__c" uniqueid="sk-2r1gkL-3762"><actions><action type="multi" label="Save Task and Close" icon="sk-icon-save"><actions><action type="blockUI" message="Saving . . ." timeout="2000"/><action type="save" rollbackonanyerror="true"><models><model>A_Temp_CR_Add_Task__c</model></models><onerroractions><action type="blockUI" message="There was an error" timeout="3000"/></onerroractions></action><action type="closeTopmostPopup"/><action type="requeryModel" model="Member" behavior="standard"><onerroractions><action type="blockUI" message="There was an error" timeout="3000"/></onerroractions></action><action type="requeryModels" behavior="standard"><models><model>Mem_Relation_Person</model><model>Mem_Relation_Org</model><model>Mem_License_Person</model><model>Mem_License_Org</model><model>Mem_Phone</model><model>Mem_Email</model><model>Mem_Social</model><model>Mem_Referred</model><model>Mem_CR_Open_Member</model><model>Mem_CR_Open_Member_Contact_Record</model><model>Mem_CR_Open_Person</model><model>Mem_CR_Open_Location</model><model>Mem_CR_Open_Organization</model><model>Mem_CR_Closed_Member</model><model>Mem_CR_CLosed_Person</model><model>Mem_CR_Calendar</model><model>Mem_Opportunities</model><model>Mem_Opportunities_Organization</model><model>Mem_Opportunities_Location</model><model>Mem_Opportunities_Person</model><model>Mem_Engagement</model><model>Mem_Engagement_Organization</model><model>Mem_Engagement_Location</model><model>Mem_Engagement_Person</model><model>Mem_Offer_Member</model><model>Mem_Offer_Organization</model><model>Mem_Offer_Location</model><model>Mem_Offer_Person</model><model>Mem_Documents</model><model>Phones_Chatter</model><model>Member_DNA_List</model><model>Location_List</model><model>Summary_Location_List</model><model>Mem_People_at_Location</model><model>Mem_People_at_Organization</model><model>Mem_Location_at_Organization</model><model>Mem_Members</model><model>Mem_Contact_Record_Results</model></models><onerroractions><action type="blockUI" message="There was an error" timeout="3000"/></onerroractions></action><action type="updateRow" fieldmodel="Edit" field="Reset" enclosevalueinquotes="true"/><action type="unblockUI"/></actions></action></actions></pagetitle><richtext multiple="false" uniqueid="sk-2r1cni-3755"><contents>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;color: rgb(102, 0, 153); font-family: &apos;comic sans ms&apos;, cursive; font-size: 14px; font-weight: bold;&quot;&gt;Enter Task&lt;/span&gt;&lt;/p&gt;
    </contents></richtext><basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="A_Temp_CR_Add_Task__c" buttonposition="" uniqueid="sk-2r1ldc-3771" mode="edit" layout="above"><columns><column width="100%"><sections><section title="Section A" collapsible="no" showheader="false"><fields><field id="Temp_CR_New_Objectives__c" showhelp="true" valuehalign="" type="" displayrows="10" required="true"><label>Objective</label></field><field id="Temp_Date_Time_Start__c" showhelp="true" valuehalign="" type="" required="true"><label>Date</label></field><field id="Temp_Assigned_To__c" showhelp="true" valuehalign="" type="" required="true" optionsource="" tokenizesearch="true"><label>Assigned To</label><searchfields><searchfield query="true" return="true" show="true" field="Name" operator="contains"/><searchfield query="true" return="false" show="false" field="User__r.Name" operator="contains"/><searchfield query="true" return="true" show="true" field="View_Member_Agent_Name__c" operator="contains"/></searchfields><filters><filter type="userinfo" operator="=" field="User__r.Id" value="" enclosevalueinquotes="true" userinfotype="userid"/></filters></field><field id="Temp_CR_Member_DNA__c" showhelp="true" valuehalign="" type="" readonly="true" required="true"><label>Member</label></field></fields></section></sections></column></columns></basicfieldeditor><basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="A_Temp_CR_Add_Task__c" buttonposition="" uniqueid="sk-2r4H67-4069" mode="readonly" layout="above"><columns><column width="100%"><sections><section title="Footprint" collapsible="collapsed"><fields><columns layoutmode="fixed"><column width="50%"><sections><section title="New Section" collapsible="no" showheader="false"><fields><field id="Temp_Status__c" valuehalign="" type=""><label>Status</label></field></fields></section></sections></column><column width="50%"><sections><section title="New Section" collapsible="no" showheader="false"><fields><field id="Temp_Type__c" showhelp="true" valuehalign="" type=""><label>Type</label></field></fields></section></sections></column></columns></fields></section></sections></column></columns></basicfieldeditor></components><oninitialshowactions><action type="save"/></oninitialshowactions><onshowactions><action type="updateRow" fieldmodel="Edit" field="Reset" enclosevalueinquotes="true" value="Task"/><action type="emptyModelData"><models><model>A_Temp_CR_Add_Task__c</model></models></action><action type="createRow" model="A_Temp_CR_Add_Task__c" appendorprepend="prepend" defaultmodefornewitems="edit"><defaults><default type="fieldvalue" field="Temp_Date_Time_Start__c" enclosevalueinquotes="false" value="TOMORROW"/><default type="fieldvalue" field="Temp_Status__c" enclosevalueinquotes="true" value="Not Started"/><default type="fieldvalue" field="Temp_Type__c" enclosevalueinquotes="true" value="Task"/></defaults></action></onshowactions><renderconditions logictype="and"><rendercondition type="fieldvalue" operator="!=" enclosevalueinquotes="true" fieldmodel="Edit" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Reset" value="Wiki"/><rendercondition type="fieldvalue" operator="!=" enclosevalueinquotes="true" fieldmodel="Edit" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Reset" value="Event"/><rendercondition type="fieldvalue" operator="!=" enclosevalueinquotes="true" fieldmodel="Edit" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Reset" value="Email"/><rendercondition type="fieldvalue" operator="!=" enclosevalueinquotes="true" fieldmodel="Edit" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Reset" value="Text"/><rendercondition type="fieldvalue" operator="!=" enclosevalueinquotes="true" fieldmodel="Edit" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Reset" value="EventAdd"/><rendercondition type="fieldvalue" operator="!=" enclosevalueinquotes="true" fieldmodel="Edit" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Reset" value="EmailAdd"/></renderconditions></tab><tab name="Event" loadlazypanels="true"><components><grid uniqueid="sk-3EgRPj-1654"><divisions><division behavior="flex" minwidth="100px" ratio="1"><components><pagetitle uniqueid="sk-3EgB2I-1634" model="Edit"><actions><action type="multi" label="Save Event" icon="ui-silk-group-add"><actions/><hotkeys/><renderconditions logictype="and"/><enableconditions/></action></actions></pagetitle><pagetitle uniqueid="sk-3Eg2Tr-1607" model="Edit"><actions><action type="multi" label="Delete this Event" icon="ui-silk-group-delete"><actions><action type="showPopup"><popup title="" width="400px"><components><richtext multiple="false" uniqueid="sk-3EigMq-1775"><contents>&lt;p&gt;&lt;span style=&quot;font-size:14px;&quot;&gt;&lt;strong&gt;&amp;nbsp;Are you sure you want to delete this CR Event?&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
    </contents></richtext><pagetitle uniqueid="sk-3EiiWK-1780" model="Edit"><actions><action type="multi" label="No, do NOT delete"><actions><action type="closeTopmostPopup"/></actions></action><action type="multi" label="Yes, Delete this event"><actions><action type="blockUI" message="Deleting the CR Event / Meeting . . ." timeout="1000"/><action type="updateRow" fieldmodel="A_Temp_CR_Add_Task__c" field="Temp_Delete_This_Record__c" enclosevalueinquotes="true" value="Delete"/><action type="save" rollbackonanyerror="true"><models><model>A_Temp_CR_Add_Task__c</model></models><onerroractions><action type="blockUI" message="There was an error" timeout="3000"/></onerroractions></action><action type="emptyModelData"><models><model>A_Temp_CR_Add_Task__c</model></models></action><action type="updateRow" model="Edit" fieldmodel="Edit" field="Reset" enclosevalueinquotes="true"/><action type="closeAllPopups"/><action type="unblockUI"/></actions></action></actions></pagetitle></components></popup></action></actions></action></actions><renderconditions logictype="and"/><conditions/></pagetitle><richtext multiple="false" uniqueid="sk-3Eg3Gh-1613"><contents>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: 13.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 0, 153); font-family: &apos;comic sans ms&apos;, cursive; font-size: 14px; font-weight: bold;&quot;&gt;Enter Event/Meeting&lt;/span&gt;&lt;/p&gt;
    </contents></richtext><skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="all" createrecords="false" model="z" buttonposition="" mode="readonly" uniqueid="sk-3Eny33-2050" instantfilters="false" emptysearchbehavior="query"><fields><field id="Id" valuehalign="" type=""/></fields><rowactions/><massactions usefirstitemasdefault="true"/><views><view type="standard"/></views><searchfields/><renderconditions logictype="and"/><conditions/></skootable><skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="all" createrecords="false" model="Mem_View_CR_Member" buttonposition="" mode="readonly" uniqueid="sk-39pPdZ-4013" instantfilters="false" emptysearchbehavior="query"><fields><field id="Id" valuehalign="" type=""/><field id="CR__c" valuehalign="" type=""/><field id="CR__r.Id" valuehalign="" type=""/></fields><rowactions/><massactions usefirstitemasdefault="true"/><views><view type="standard"/></views><searchfields/></skootable></components></division></divisions><styles><styleitem type="background" bgtype="none"/></styles><renderconditions logictype="and"><rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="Edit" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Reset" value="EventAdd"/></renderconditions></grid><grid uniqueid="sk-382O4z-1468"><divisions><division behavior="flex" minwidth="100px" ratio="1"><components><pagetitle uniqueid="sk-2uUK_Z-1294" model="A_Temp_CR_Add_Task__c"><actions><action type="multi" label="Save Event and Close" icon="sk-icon-save"><actions><action type="blockUI" message="Saving . . ." timeout="2000"/><action type="save" rollbackonanyerror="true"><models><model>A_Temp_CR_Add_Task__c</model></models><onerroractions><action type="blockUI" message="There was an error" timeout="3000"/></onerroractions></action><action type="closeTopmostPopup"/><action type="requeryModel" model="Member" behavior="standard"><onerroractions><action type="blockUI" message="There was an error" timeout="3000"/></onerroractions></action><action type="requeryModels" behavior="standard"><models><model>Mem_Relation_Person</model><model>Mem_Relation_Org</model><model>Mem_License_Person</model><model>Mem_License_Org</model><model>Mem_Phone</model><model>Mem_Email</model><model>Mem_Social</model><model>Mem_Referred</model><model>Mem_CR_Open_Member</model><model>Mem_CR_Open_Member_Contact_Record</model><model>Mem_CR_Open_Person</model><model>Mem_CR_Open_Location</model><model>Mem_CR_Open_Organization</model><model>Mem_CR_Closed_Member</model><model>Mem_CR_CLosed_Person</model><model>Mem_CR_Calendar</model><model>Mem_Opportunities</model><model>Mem_Opportunities_Organization</model><model>Mem_Opportunities_Location</model><model>Mem_Opportunities_Person</model><model>Mem_Engagement</model><model>Mem_Engagement_Organization</model><model>Mem_Engagement_Location</model><model>Mem_Engagement_Person</model><model>Mem_Offer_Member</model><model>Mem_Offer_Organization</model><model>Mem_Offer_Location</model><model>Mem_Offer_Person</model><model>Mem_Documents</model><model>Phones_Chatter</model><model>Member_DNA_List</model><model>Location_List</model><model>Summary_Location_List</model><model>Mem_People_at_Location</model><model>Mem_People_at_Organization</model><model>Mem_Location_at_Organization</model><model>Mem_Members</model><model>Mem_Contact_Record_Results</model></models><onerroractions><action type="blockUI" message="There was an error" timeout="3000"/></onerroractions></action><action type="updateRow" fieldmodel="Edit" field="Reset" enclosevalueinquotes="true"/><action type="unblockUI"/></actions><renderconditions logictype="and"><rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="A_Temp_CR_Add_Task__c" sourcetype="fieldvalue" field="Temp_Document_to_Upload__c" value="No"/><rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="A_Temp_CR_Add_Task__c" sourcetype="fieldvalue" field="Temp_Multiple_Members__c" value="No"/><rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="A_Temp_CR_Add_Task__c" sourcetype="fieldvalue" field="Temp_Multiple_Users__c" value="No"/></renderconditions><enableconditions logictype="and"/><hotkeys/></action><action type="multi" label="Save and Continue" icon="sk-icon-upload"><renderconditions logictype="custom" logic="(1OR 2 OR 3) AND 4"><rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="A_Temp_CR_Add_Task__c" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Temp_Multiple_Members__c" value="Yes"/><rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="A_Temp_CR_Add_Task__c" sourcetype="fieldvalue" field="Temp_Multiple_Users__c" value="Yes"/><rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="A_Temp_CR_Add_Task__c" sourcetype="fieldvalue" field="Temp_Document_to_Upload__c" value="Yes"/><rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="Edit" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Reset" value="Event"/></renderconditions><enableconditions/><actions><action type="blockUI" message="Saving . . ." timeout="2000"/><action type="save" rollbackonanyerror="true"><models><model>A_Temp_CR_Add_Task__c</model></models><onerroractions><action type="blockUI" message="There was an error" timeout="3000"/></onerroractions></action><action type="updateRow" fieldmodel="Edit" field="Reset" enclosevalueinquotes="true" value="EventAdd"/><action type="requeryModels" model="Mem_View_CR_Member" behavior="standard"><onerroractions><action type="blockUI" message="There was an error" timeout="3000"/></onerroractions><models><model>Mem_View_CR_Member</model><model>z</model></models></action><action type="unblockUI"/></actions></action><action type="multi" label="Cancel and Close" icon="sk-icon-cancel"><actions/></action></actions><renderconditions logictype="and"><rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="A_Temp_CR_Add_Task__c" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Temp_Document_to_Upload__c" value="No"/></renderconditions></pagetitle><richtext multiple="false" uniqueid="sk-2uULoQ-1300"><contents>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;color: rgb(102, 0, 153); font-family: &apos;comic sans ms&apos;, cursive; font-size: 14px; font-weight: bold;&quot;&gt;Enter Event/Meeting&lt;/span&gt;&lt;/p&gt;
    </contents></richtext><basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="A_Temp_CR_Add_Task__c" buttonposition="" uniqueid="sk-2uUUPK-1344" mode="edit" layout="above"><columns><column width="50%"><sections><section title="Section A" collapsible="no" showheader="false"><fields><field id="Temp_Date_Time_Start__c" showhelp="true" valuehalign="" type="" required="true"><label>Start</label></field></fields></section></sections></column><column width="50%"><sections><section title="Section B" collapsible="no" showheader="false"><fields><field id="Temp_Date_Time_End__c" showhelp="true" valuehalign="" type="" required="true"><label>End</label></field></fields></section></sections></column></columns></basicfieldeditor><basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="A_Temp_CR_Add_Task__c" buttonposition="" uniqueid="sk-2wG8uy-5153" mode="edit" layout="above"><columns><column width="100%"><sections><section title="Section A" collapsible="no" showheader="false"><fields><field id="Temp_CR_New_Objectives__c" showhelp="true" valuehalign="" type="" displayrows="10" required="true"><label>Objective/Schedule</label></field><field id="Temp_CR_Member_DNA__c" showhelp="true" valuehalign="" type="" required="true" readonly="true"><label>Member</label></field><field id="Temp_Multiple_Members__c" showhelp="true" valuehalign="" type="" required="true" addnoneoption="false"><label>Will there be other Members?</label><renderconditions logictype="and" onhidedatabehavior="keep"/><enableconditions/></field><field id="Temp_Assigned_To__c" showhelp="true" valuehalign="" type="" required="true" optionsource="" tokenizesearch="true" searchtemplate="Type agent name or zip code"><label>Assigned to</label><searchfields><searchfield query="true" return="false" show="false" field="Name" operator="contains"/><searchfield query="true" return="false" show="false" field="User__r.Name" operator="contains"/><searchfield query="false" return="true" show="true" field="Name" operator="contains"/><searchfield query="false" return="true" show="true" field="User__r.View_Name__c" operator="contains"/></searchfields></field><field id="Temp_Multiple_Users__c" showhelp="true" valuehalign="" type="" required="true"><label>Will there be other Member Agents / Users?</label><renderconditions logictype="and" onhidedatabehavior="keep"/><enableconditions/></field><field id="Temp_Document_to_Upl
  • Matt SonesMatt Sones ✭✭
    edited February 2017
    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.
  • Rob HatchRob Hatch 🛠️ 
    edited September 2016
    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> 

Sign In or Register to comment.