Formula Field Value not updating when formula uses global merge syntax

  • 3
  • Problem
  • Updated 8 months ago
  • Acknowledged
  • (Edited)
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
1) Create page with XML below
2) Preview page
3) 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

4) 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>
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb

Posted 2 years ago

  • 3
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,240 Points 5k badge 2x thumb
Barry~

Thanks for reporting this bug. The devs are aware of it and will consider it for a future release. This post will be updated when a fix is available. 

Thanks!
Karen
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Thanks Karen!
Photo of and thorough

and thorough

  • 736 Points 500 badge 2x thumb
Has this been fixed?  I think I'm having a similar issue: I have a formula field in a UI-only model that uses global merge syntax to check whether conditions on other models are inactive, e.g., {{$Model.MyModel.conditions.2.inactive}}.  The formula result does not update in real time when the referenced condition is activated.  However, if a new row is added to the UI-only model, the new row shows the correct formula result.  I thought maybe this was only an issue on a UI model so I tried adding the UI formula field to a model tied to a Salesforce object and had the same problem where the formula result did not update in real time.

Thanks for any help or info on this!