Featured Video Play Icon

In this video I show how to substitute the Lookup field with a template that downloads the file vs. going to the record for the attachment.

<skuidpage unsavedchangeswarning="yes" showsidebar="false" showheader="true">
   <models>
      <model id="Users" limit="20" query="true" createrowifnonefound="false" sobject="User">
         <fields>
            <field id="Id"/>
            <field id="Name"/>
         </fields>
         <conditions>
            <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Id" state="filterableoff" inactive="true" name="Id"/>
         </conditions>
         <actions/>
      </model>
      <model id="UserExpenses" limit="20" query="true" createrowifnonefound="false" sobject="Expense__c">
         <fields>
            <field id="From__c"/>
            <field id="Amount__c"/>
            <field id="CreatedDate"/>
            <field id="Purchase_Date__c"/>
            <field id="CreatedById"/>
            <field id="CreatedBy.Name"/>
            <field id="Attachments" type="childRelationship" limit="10">
               <fields>
                  <field id="Id"/>
                  <field id="Name"/>
               </fields>
               <conditions/>
            </field>
         </fields>
         <conditions>
            <condition type="fieldvalue" value="" field="CreatedById" operator="=" mergefield="Id" novaluebehavior="deactivate" enclosevalueinquotes="true" state="filterableoff" inactive="true" name="CreatedById"/>
         </conditions>
         <actions/>
      </model>
      <model id="UserList" limit="" query="true" createrowifnonefound="false" sobject="User" doclone="" type="">
         <fields>
            <field id="Name"/>
            <field id="Id"/>
         </fields>
         <conditions/>
         <actions/>
      </model>
      <model id="NewExpense" limit="" query="false" createrowifnonefound="false" sobject="Expense__c" doclone="" type="">
         <fields>
            <field id="From__c"/>
            <field id="Amount__c"/>
            <field id="CreatedDate"/>
            <field id="Purchase_Date__c"/>
         </fields>
         <conditions/>
         <actions/>
      </model>
   </models>
   <components>
      <skootable showconditions="true" showsavecancel="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Users" buttonposition="" mode="read">
         <fields>
            <field id="Name"/>
         </fields>
         <rowactions>
            <action type="edit"/>
            <action type="delete"/>
            <action type="multi" label="Add Expense" icon="ui-silk-money-dollar">
               <actions>
                  <action type="emptyModelData">
                     <models>
                        <model>NewExpense</model>
                     </models>
                  </action>
                  <action type="createRow" model="NewExpense" appendorprepend="prepend" defaultmodefornewitems="edit"/>
                  <action type="showPopup">
                     <popup title="New Popup" width="600px">
                        <components>
                           <file storeas="record" displayas="filename" model="NewExpense" label="Attach Receipt">
                              <renderconditions logictype="and">
                                 <rendercondition fieldmodel="NewExpense" sourcetype="rowproperty" nosourcerowbehavior="deactivate" sourceproperty="isSaved" enclosevalueinquotes="false"/>
                              </renderconditions>
                           </file>
                           <basicfieldeditor showheader="true" showsavecancel="true" model="NewExpense" buttonposition="" mode="edit" layout="">
                              <columns>
                                 <column width="100%">
                                    <sections>
                                       <section title="Section A" collapsible="no" showheader="false">
                                          <fields>
                                             <field id="From__c" valuehalign="" type=""/>
                                             <field id="Amount__c"/>
                                             <field id="Purchase_Date__c"/>
                                          </fields>
                                       </section>
                                    </sections>
                                 </column>
                              </columns>
                           </basicfieldeditor>
                        </components>
                     </popup>
                  </action>
               </actions>
            </action>
            <action type="drawer" label="List of Expenses" icon="ui-silk-text-list-bullets" openicon="ui-silk-arrow-up">
               <drawer title="Drawer Area" width="90%" closehandle="true">
                  <components>
                     <skootable showconditions="true" showsavecancel="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="false" model="UserExpenses" buttonposition="" mode="read">
                        <fields>
                           <field id="From__c"/>
                           <field id="Amount__c"/>
                           <field id="CreatedDate"/>
                           <field id="Purchase_Date__c"/>
                           <field id="CreatedById"/>
                           <field id="Attachments" type="CHILDREL" limit="100" valuehalign="">
                              <label>Receipt</label>
                              <template>&lt;a href="/servlet/servlet.FileDownload?file={{{Id}}}" target="_blank"&gt;{{{Name}}}&lt;/a&gt;</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>
                        <conditions>
                           <condition type="contextrow" field="CreatedById" mergefield="Id"/>
                        </conditions>
                     </skootable>
                  </components>
                  <beforeload>
                     <action type="setCondition" model="UserExpenses" condition="CreatedById" value="{{Id}}"/>
                     <action type="requeryModels" behavior="loadmore">
                        <models>
                           <model>UserExpenses</model>
                        </models>
                     </action>
                  </beforeload>
               </drawer>
            </action>
         </rowactions>
         <massactions usefirstitemasdefault="true">
            <action type="massupdate"/>
            <action type="massdelete"/>
         </massactions>
         <views>
            <view type="standard"/>
         </views>
         <filters>
            <filter type="select" filteroffoptionlabel="Any" createfilteroffoption="true" affectcookies="true" autocompthreshold="25" conditionsource="manual" labelmode="manual" condition="Id" label="User">
               <sources>
                  <source type="model" effectsbehavior="justdefault" model="UserList">
                     <labeltemplate>{{{Name}}}</labeltemplate>
                     <valuetemplate>{{Id}}</valuetemplate>
                  </source>
               </sources>
            </filter>
         </filters>
      </skootable>
   </components>
   <resources>
      <labels/>
      <javascript/>
      <css/>
   </resources>
</skuidpage>