Records not showing in Drawers Table?

  • 1
  • Question
  • Updated 4 years ago
  • Answered
I am showing accounts with contacts in list view(contacts are showing with help of drawers)Every thing is working fine except below issues in Drawers

1.I gave "show all" in visible rows (in Pagination section of drawers).
But drawers table of accounts didn't show all contacts.
When clicking "Load More" button, its showing all contacts.

How to load all contacts without "Load More" button click on Drawers contact table?
2. How to hide "Showing Rows 1-1 of 1+" in Drawers table?


My XML code:
<skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true">
   <models>
      <model id="Account" limit="20" query="true" createrowifnonefound="false" sobject="Account">
         <fields>
            <field id="Name"/>
            <field id="AccountNumber"/>
            <field id="Phone"/>
            <field id="Description"/>
            <field id="SLASerialNumber__c"/>
            <field id="YearStarted"/>
         </fields>
         <conditions/>
         <actions/>
      </model>
      <model id="Contact" limit="20" query="true" createrowifnonefound="false" sobject="Contact">
         <fields>
            <field id="AccountId"/>
            <field id="Account.Name"/>
            <field id="AssistantName"/>
            <field id="AssistantPhone"/>
            <field id="Birthdate"/>
            <field id="Fax"/>
            <field id="Phone"/>
            <field id="InformalName"/>
            <field id="Title"/>
            <field id="LastName"/>
         </fields>
         <conditions/>
         <actions/>
      </model>
      <model id="Status" limit="20" query="true" createrowifnonefound="false" sobject="Status__c">
         <fields>
            <field id="Status_Value__c"/>
         </fields>
         <conditions/>
         <actions/>
      </model>
   </models>
   <components>
      <skootable showconditions="true" showsavecancel="true" searchmethod="server" searchbox="true" showexportbuttons="true" pagesize="10" createrecords="true" model="Account" buttonposition="" mode="read">
         <fields>
            <field id="Description"/>
            <field id="Name"/>
            <field id="AccountNumber" valuehalign="" type="CUSTOM" snippet="StatusShow"/>
            <field id="Phone"/>
            <field id="SLASerialNumber__c" valuehalign="" type=""/>
            <field id="YearStarted" valuehalign="" type=""/>
         </fields>
         <rowactions>
            <action type="edit"/>
            <action type="delete"/>
            <action type="drawer" label="Run multiple actions" icon="ui-silk-user-add">
               <drawer title="Drawer Area" width="90%" closehandle="true">
                  <components>
                     <pagetitle model="Contact">
                        <maintitle>
                           <template>{{Name}}</template>
                        </maintitle>
                        <subtitle>
                           <template>{{Model.label}}</template>
                        </subtitle>
                        <actions>
                           <action type="save" label="Save" window="self" rollbackonanyerror="true"/>
                        </actions>
                     </pagetitle>
                     <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="all" createrecords="true" model="Contact" buttonposition="" mode="read" instantfilters="false" emptysearchbehavior="query">
                        <fields>
                           <field id="LastName"/>
                           <field id="AssistantName"/>
                           <field id="AssistantPhone"/>
                           <field id="Birthdate"/>
                           <field id="Fax"/>
                           <field id="Phone"/>
                           <field id="Title" valuehalign="" type=""/>
                        </fields>
                        <rowactions>
                           <action type="edit"/>
                           <action type="delete"/>
                        </rowactions>
                        <massactions usefirstitemasdefault="true">
                           <action type="massupdate"/>
                           <action type="massdelete"/>
                        </massactions>
                        <views>
                           <view type="standard"/>
                        </views>
                        <renderconditions logictype="and"/>
                        <conditions>
                           <condition type="contextrow" field="AccountId" mergefield="Id"/>
                        </conditions>
                        <actions defaultlabel="Global Actions" defaulticon="sk-icon-magic" usefirstitemasdefault="true"/>
                        <searchfields/>
                     </skootable>
                  </components>
               </drawer>
            </action>
         </rowactions>
         <massactions usefirstitemasdefault="true">
            <action type="massupdate"/>
            <action type="massdelete"/>
         </massactions>
         <views>
            <view type="standard"/>
         </views>
         <exportproperties usetablecolumns="true" appendrowidcolumn="false"/>
      </skootable>
   </components>
   <resources>
      <labels/>
      <javascript>
         <jsitem location="inlinesnippet" name="StatusShow" cachelocation="false">var params = arguments[0],
$ = skuid.$;
var field = arguments[0];
var value = arguments[1];
console.log(field.mode);
if (field.mode === 'edit') {
  
var disabilityOptions = [];

skuid.$.each(skuid.model.getModel('Status').getRows(), function(i,row) {
console.log('---row----'+row);
disabilityOptions.push({
value : row.Status_Value__c, 
label : row.Status_Value__c  
});
});
console.log('---disabilityOptions----'+disabilityOptions);

var disabilitySelect = skuid.ui.renderers.PICKLIST.edit({
entries : disabilityOptions,
required : false,
value : value
}).change(function() {
//alert(skuid.$(this).val());
field.model.updateRow(field.row,'AccountNumber',skuid.$(this).val());
});
field.element.append(disabilitySelect);
} else {
console.log('-----nonedit------'+field.mode);

    skuid.ui.fieldRenderers.TEXT[field.mode](field,value);
}
</jsitem>
      </javascript>
      <css/>
   </resources>
</skuidpage>
Photo of Siva

Siva

  • 180 Points 100 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Have you followed this tutorial?  http://help.skuidify.com/m/components/l/269735-add-nested-rows-to-your-table-with-drawers

What you are reporting seems like its associated with not using "before drawer opens - actions"  ,  model query issues, and table context issues.  All of these are addressed in that tutorial. 
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
You will need to adjust the Contacts Model Max # of records (Limit) setting.
Photo of Siva

Siva

  • 180 Points 100 badge 2x thumb
thanks Rob and Irvin