Skip to main content
Nintex Community Menu Bar

Forms: Repeating Section

  • March 23, 2017
  • 4 replies
  • 13 views

Forum|alt.badge.img+7

Hi All,

I have a Repeating Section which contains some controls. 

I see that the minimum rows you are allowed to set is 1. I'd prefer it be zero but it looks like that is not possible by design.

However, it is very important for part of my workflow that certain actions ONLY execute if the count of the rows in the repeating section is greater than zero, because therefore it actually contains data! However, I'm seeing that my count is actually counting the blank row as a legitimate row and this is a big problem. 

IS there any way I can validate in my count whether the node actually contains data, and not to count it if it's empty?

Here is the XSLT I use to count the number of "items":

<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="text" />

<xsl:template match="/">
<xsl:value-of select="count(//RepeaterData/Items/Item)"/>
</xsl:template>

</xsl:stylesheet>

4 replies

Forum|alt.badge.img+8

Hi ,‌

Just out of my head, and assuming that when you add 1 row with content the count is also 1:

Couldn't you add an extra condition that when count is 1, you also check the value of a column? If it is empty, there is only a blank row.

Cheers,

Rick


Forum|alt.badge.img+7
  • Nintex Partner
  • March 24, 2017

Hi,

You can do it in easier way:

My sample will look like this:

What we have to do is the below:

1-Add a calculated value to the repeating section. I named it "calc" with the below formula:

Where "txt" is a text inside the repeating section control.  

2-Add a calculated value outside the repeating section control with the below formula:

3-Now the form will work in this way:

4-Check the value of the calculated value outside the repeating section. If it's greater than "0", that means the user didn't fill data.

Cheers...happy.png 


Forum|alt.badge.img+7
  • Author
  • March 24, 2017

Thanks, simple and works!


Forum|alt.badge.img+7
  • Nintex Partner
  • March 24, 2017

Anytime happy.png