List index out of bounds: 1 Overriding DateTime Field

Josef,

I have this working in Skuid 10.0.x. I think you are on the same version.

The way I made it work ‘declaratively’ is to edit the XML and replace the ‘value’ with the merge syntax for {{StartDateTime}}.

                    <action type="updateRow" model="Event" appendorprepend="prepend" defaultmodefornewitems="edit" affectedrows="context" fieldmodel="Event" field="EndDateTime" enclosevalueinquotes="false" value="<b>{{StartDateTime}}</b>"/>

Here is my XML:

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" useviewportmeta="true" showsidebar="true" showheader="true" tabtooverride="Event">
    <models>
        <model id="Event" limit="1" query="false" createrowifnonefound="true" datasource="salesforce" sobject="Event" type="">
            <fields>
                <field id="Subject"/>
                <field id="EndDateTime"/>
                <field id="StartDateTime"/>
            </fields>
            <conditions/>
            <actions>
                <action>
                    <actions>
                        <action type="updateRow" model="Event" appendorprepend="prepend" defaultmodefornewitems="edit" affectedrows="context" fieldmodel="Event" field="EndDateTime" enclosevalueinquotes="false" value="{{StartDateTime}}"/>
                    </actions>
                    <events>
                        <event>row.updated</event>
                    </events>
                    <fields>
                        <field>StartDateTime</field>
                    </fields>
                </action>
            </actions>
        </model>
    </models>
    <components>
        <pagetitle model="Event" uniqueid="sk-uji7t-91">
            <maintitle>
                <template>New {{Model.label}}</template>
            </maintitle>
            <subtitle>
                <template>{{Model.labelPlural}}</template>
            </subtitle>
            <actions>
                <action type="savecancel" afterCancel="/{{Model.KeyPrefix}}/o" afterSave="/{{Id}}" rollbackonanyerror="true" uniqueid="sk-uji7s-90"/>
            </actions>
        </pagetitle>
        <basicfieldeditor showsavecancel="false" showheader="true" model="Event" mode="edit" uniqueid="sk-uji85-100">
            <columns>
                <column width="50%">
                    <sections>
                        <section title="Basics" collapsible="no">
                            <fields>
                                <field id="Subject" uniqueid="sk-uji7z-97"/>
                                <field uniqueid="sk-ujlGQ-130" id="StartDateTime" valuehalign="" type=""/>
                                <field uniqueid="sk-ujlGQ-129" id="EndDateTime"/>
                            </fields>
                        </section>
                    </sections>
                </column>
                <column width="50%">
                    <sections>
                        <section title="Additional Info">
                            <fields/>
                        </section>
                    </sections>
                </column>
            </columns>
        </basicfieldeditor>
    </components>
    <resources>
        <labels/>
        <css/>
        <javascript/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>

Thanks,

Bill