Skip to main content
Nintex Community Menu Bar
Question

Conditional Rendering Model Property number of rows issue

  • July 9, 2024
  • 8 replies
  • 37 views

Forum|alt.badge.img+13

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>

8 replies

Forum|alt.badge.img+17
  • Nintex Employee
  • July 9, 2024

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. 


Forum|alt.badge.img+13

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.


Forum|alt.badge.img+13

Lightening fast as always, thanks Zach!


Forum|alt.badge.img+13

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


Forum|alt.badge.img+8

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.


Forum|alt.badge.img+13

Awesome, thanks Ben!


Forum|alt.badge.img+8

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.


Forum|alt.badge.img+13

Tested and confirmed with 6.8.8.  Thanks Ben!