Formula fields that use global merge syntax are not updating when the data in the merge syntax changes.
Examples:
{{$Model.Account.data.0.Name}}
{{$Model.Account.data.length}}
Steps to reproduce
- Create page with XML below
- Preview page
- Change the first records name
Expected Behavior
Formula field “AccountRow0Name” is updated in all rows
Actual Behavior
Only the row that is changed is updated
- Click “+” on table to add a new row
Expected Behavior
AccountRowCount in all rows should reflect the current number of rows and AccountRow0Name should be updated in all rows
Actual Behavior
AccountRowCount and AccountRow0Name in new row are correct but existing rows were not updated
Page XML
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Account"> <models>
<model id="Account" limit="20" query="true" createrowifnonefound="false" sobject="Account" adapter="" type="">
<fields>
<field id="Name"/>
<field id="CreatedDate"/>
<field id="AccountRow0Name" uionly="true" displaytype="FORMULA" label="AccountRow0Name" readonly="true" returntype="TEXT" precision="9" scale="2">
<formula>{{$Model.Account.data.0.Name}}</formula>
</field>
<field id="AccountRowCount" uionly="true" displaytype="FORMULA" label="AccountRowCount" readonly="true" returntype="DOUBLE" precision="9" scale="2">
<formula>{{$Model.Account.data.length}}</formula>
</field>
</fields>
<conditions/>
<actions/>
</model>
</models>
<components>
<pagetitle model="Account" uniqueid="sk-cNOcY-70">
<maintitle>
<template>{{Name}}</template>
</maintitle>
<subtitle>
<template>{{Model.label}}</template>
</subtitle>
<actions>
<action type="savecancel" window="self"/>
</actions>
</pagetitle>
<skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Account" buttonposition="" mode="read" uniqueid="sk-cNaQf-118">
<fields>
<field id="Name"/>
<field id="AccountRowCount" decimalplaces="" valuehalign="" type=""/>
<field id="AccountRow0Name" decimalplaces="" 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>
</skootable>
</components>
<resources>
<labels/>
<css/>
<javascript/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>