Skip to main content

Is it possible to export a child relationship? We can show it in a template field on the table, but I do not see a way to add it to the export columns. 

Amish~

What if you have the model of the table be the child object and bring in the appropriate fields from the parent object?

Thanks!
Karen 


Amish. Enclosed below is a page that shows Accounts, and then has a child relationship on Contacts. This is replicated in the export columns (so that you could remove the contacts from the table and still have the data export).


<skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true" tabtooverride="Account" personalizationmode="server">    <models>
<model id="Account" limit="100" query="true" createrowifnonefound="false" sobject="Account">
<fields>
<field id="Name"/>
<field id="CreatedDate"/>
<field id="Contacts" type="childRelationship" limit="" orderby="LastName, FirstName">
<fields>
<field id="FirstName"/>
<field id="LastName"/>
</fields>
<conditions/>
</field>
</fields>
<conditions/>
<actions/>
</model>
</models>
<components>
<pagetitle model="Account" uniqueid="sk-31XNxr-69">
<maintitle>
<template>{{Model.labelPlural}}</template>
</maintitle>
<subtitle>
<template>Home</template>
</subtitle>
<actions>
<action type="savecancel"/>
</actions>
</pagetitle>
<skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="true" pagesize="10" createrecords="true" model="Account" mode="read" uniqueid="sk-31XNxr-70">
<fields>
<field id="Name" allowordering="true"/>
<field id="CreatedDate" allowordering="true"/>
<field id="Contacts" type="CHILDREL" limit="100" valuehalign="" delimiter="&amp;lt;br/&amp;gt;">
<label>Contacts</label>
<template>{{FirstName}} {{LastName}}</template>
</field>
</fields>
<rowactions>
<action type="edit"/>
<action type="delete"/>
</rowactions>
<massactions usefirstitemasdefault="true">
<action type="massupdate"/>
<action type="massdelete"/>
</massactions>
<views>
<view type="standard"/>
</views>
<exportproperties usetablecolumns="false" loadallrecords="true" filename="AccountsWithContacts.csv" appendrowidcolumn="false">
<columns>
<column type="field" headertype="fieldlabel" field="Name"/>
<column type="field" headertype="fieldlabel" field="CreatedDate"/>
<column type="template" headertype="fieldlabel">
<label>Contacts</label>
<template>{{#Contacts.records}}{{FirstName}} {{LastName}}, {{/Contacts.records}}</template>
</column>
</columns>
</exportproperties>
</skootable>
</components>
<resources>
<labels/>
<css/>
<javascript/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>