Skip to main content

The new conditional rendering features added to the Dreamforce release are killer, thank you!


Came across an issue related to the proper evaluation of a conditional rendering property marked to number of rows in model. In appears that the evaluation is using === / !== and unfortunately the data types are different (data.length is numeric while the value from the xml is string). This results in incorrect evaluation.


Steps to reproduce:


  1. Create a new detail page for Account

  2. Remove everything except page title

  3. Add 3 templates

  • First template with text “Show if RowCount == 1” set to conditionally render when # of rows in Account equals 1

  • Second template with text “Show if RowCount != 1” set to conditionally render when # of rows in Account does not equal 1

  • Third template with text “{{$Model.Account.data.length}}”

  1. Preview the page picking an account when prompted

Actual Result

Template #2 appears


Expected Result

Template #1 appears


Repro Page


<skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true" tabtooverride="Account">   <models>
<model id="Account" limit="1" query="true" createrowifnonefound="false" sobject="Account">
<fields>
<field id="Name"/>
<field id="CreatedDate"/>
</fields>
<conditions>
<condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"/>
</conditions>
<actions/>
</model>
</models>
<components>
<pagetitle model="Account">
<maintitle>
<template>{{Name}}</template>
</maintitle>
<subtitle>
<template>{{Model.label}}</template>
</subtitle>
<actions/>
</pagetitle>
<template multiple="false" model="Account">
<contents>Show if RowCount == 1</contents>
<renderconditions logictype="and">
<rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="Account" sourcetype="modelproperty" nosourcerowbehavior="deactivate" sourceproperty="data.length" value="1"/>
</renderconditions>
</template>
<template multiple="false" model="Account">
<contents>Show if RowCount != 1</contents>
<renderconditions logictype="and">
<rendercondition type="fieldvalue" operator="!=" enclosevalueinquotes="true" fieldmodel="Account" sourcetype="modelproperty" nosourcerowbehavior="deactivate" sourceproperty="data.length" value="1"/>
</renderconditions>
</template>
<template multiple="false" model="Account">
<contents>Row Count = {{$Model.Account.data.length}}</contents>
</template>
</components>
<resources>
<labels/>
<css/>
<javascript/>
</resources>
</skuidpage>

Thanks Barry. We’ve  recreated the error and will work to fix as soon as we can.  As usual - appreciate how thorough your bug reports are. 


The issue has been resolved in the upcoming Skuid Winter 15 release, we’ll see if we can get this into an upcoming patch of Skuid Summer 14.


Lightening fast as always, thanks Zach!


Hi guys - This appears to still be an issue with 6.8.7.  Any updates?


Not sure if this was ever fixed or if it was a regression, but it has been fixed now.  It will be available in the next patch release.


Awesome, thanks Ben!


This has been fixed in Skuid 6.8.8 available on the Skuid Releases page.

http://www.skuidify.com/skuidreleases

Let me know if this resolves the issue.


Tested and confirmed with 6.8.8.  Thanks Ben!


Reply