How to tell if a file has been uploaded

Hi Matt,

Thanks for the help. I added an action on the NewAccount model so that when it is saved it resets the Condition on the NewAccountAttachment model and then requeries it, and now it works.

I’ll paste the XML below in case anyone else ever runs into this same problem.

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Account"> <models>
 <model id="Account" limit="1" query="true" createrowifnonefound="false" sobject="Account" adapter="" type="">
 <fields>
 <field id="Name"/>
 <field id="CreatedDate"/>
 </fields>
 <conditions>
 <condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"/>
 </conditions>
 <actions/>
 </model>
 <model id="Attachment" limit="20" query="true" createrowifnonefound="false" adapter="" type="" sobject="Attachment">
 <fields>
 <field id="Description"/>
 <field id="Name"/>
 <field id="CreatedById"/>
 <field id="CreatedBy.Name"/>
 <field id="CreatedDate"/>
 <field id="LastModifiedDate"/>
 <field id="LastModifiedById"/>
 <field id="LastModifiedBy.Name"/>
 </fields>
 <conditions>
 <condition type="modelmerge" value="" field="ParentId" operator="=" model="Account" enclosevalueinquotes="true" mergefield="Id" novaluebehavior="deactivate"/>
 </conditions>
 <actions/>
 </model>
 <model id="NewAccount" limit="1" query="false" createrowifnonefound="true" adapter="" type="" sobject="Account">
<fields>
 <field id="Id"/>
 <field id="Name"/>
</fields>
<conditions/>
<actions>
 <action>
 <actions>
 <action type="setCondition" model="NewAccountAttachment" condition="ParentId" value="{{$Model.NewAccount.data.0.Id}}"/>
 <action type="requeryModel" model="NewAccountAttachment" behavior="standard"/>
 </actions>
 <events>
 <event>models.saved</event>
 </events>
 </action>
</actions>
</model>
<model id="NewAccountAttachment" limit="20" query="true" createrowifnonefound="false" adapter="" type="" sobject="Attachment">
 <fields>
 <field id="Description"/>
 <field id="Name"/>
 <field id="CreatedById"/>
 <field id="CreatedBy.Name"/>
 <field id="CreatedDate"/>
 <field id="LastModifiedDate"/>
 <field id="LastModifiedById"/>
 <field id="LastModifiedBy.Name"/>
 </fields>
 <conditions>
 <condition type="modelmerge" value="" field="ParentId" operator="=" model="NewAccount" enclosevalueinquotes="true" mergefield="Id" novaluebehavior="noquery" state="filterableon" inactive="false" name="ParentId"/>
 </conditions>
 <actions/>
 </model>
</models>
 <components>
 <pagetitle model="Account" uniqueid="sk-2LwnYg-72">
 <maintitle>
 <template>{{Name}}</template>
 </maintitle>
 <subtitle>
 <template>{{Model.label}}</template>
 </subtitle>
 <actions>
 <action type="delete"/>
 <action type="clone"/>
 <action type="share"/>
 <action type="savecancel" window="self"/>
 <action type="multi" label="New Account">
<actions>
 <action type="showPopup">
 <popup title="New Popup" width="90%">
 <components>
 <pagetitle model="NewAccount" uniqueid="sk-2Mf3Br-154">
 <maintitle>
 <template>{{Name}}</template>
 </maintitle>
 <subtitle>
 <template>{{Model.label}}</template>
 </subtitle>
 <actions/>
 </pagetitle>
 <basicfieldeditor showheader="true" showsavecancel="true" showerrorsinline="true" model="NewAccount" buttonposition="" uniqueid="sk-2Mf4Lk-157" mode="edit">
 <columns>
 <column width="50%">
 <sections>
 <section title="Section A" collapsible="no">
 <fields>
 <field id="Id"/>
 </fields>
 </section>
 </sections>
 </column>
 <column width="50%">
 <sections>
 <section title="Section B">
 <fields>
 <field id="Name" valuehalign="" type=""/>
 </fields>
 </section>
 </sections>
 </column>
 </columns>
 </basicfieldeditor>
 <file storeas="record" displayas="filename" uniqueid="sk-2Mf6mt-167" model="NewAccount"/>
 <skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="NewAccountAttachment" buttonposition="" mode="read" uniqueid="sk-2MfRDd-222">
 <fields>
 <field id="CreatedById"/>
 <field id="CreatedDate"/>
 <field id="Description"/>
 <field id="Name"/>
 <field id="LastModifiedById"/>
 <field id="LastModifiedDate"/>
 </fields>
 <rowactions>
 <action type="edit"/>
 <action type="delete"/>
 </rowactions>
 <massactions usefirstitemasdefault="true">
 <action type="massupdate"/>
 <action type="massdelete"/>
 </massactions>
 <views>
 <view type="standard"/>
 </views>
 </skootable>
 </components>
 </popup>
 </action>
</actions>
</action>
</actions>
 </pagetitle>
 <basicfieldeditor showsavecancel="false" showheader="true" model="Account" mode="read" uniqueid="sk-2LwnYg-73">
 <columns>
 <column width="50%">
 <sections>
 <section title="Basics">
 <fields>
 <field id="Name"/>
 </fields>
 </section>
 </sections>
 </column>
 <column width="50%">
 <sections>
 <section title="System Info">
 <fields>
 <field id="CreatedDate"/>
 </fields>
 </section>
 </sections>
 </column>
 </columns>
 </basicfieldeditor>
 <file storeas="record" displayas="filename" uniqueid="sk-2Lx1K8-127" model="Account"/>
 <skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Attachment" buttonposition="" mode="read" uniqueid="sk-2Lx7qx-140">
 <fields>
 <field id="Name"/>
 <field id="Description"/>
 <field id="CreatedDate"/>
 <field id="CreatedById"/>
 <field id="LastModifiedDate"/>
 <field id="LastModifiedById"/>
 </fields>
 <rowactions>
 <action type="edit"/>
 <action type="delete"/>
 </rowactions>
 <massactions usefirstitemasdefault="true">
 <action type="massupdate"/>
 <action type="massdelete"/>
 </massactions>
 <views>
 <view type="standard"/>
 </views>
 </skootable>
 </components>
 <resources>
 <labels/>
 <css/>
 <javascript/>
 </resources>
 <styles>
 <styleitem type="background" bgtype="none"/>
 </styles>
</skuidpage>