cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Forms: Repeating Section

Jump to solution

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">

<xslSmiley Surprisedutput method="text" />

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

</xsl:stylesheet>

Labels: (1)
Tags (1)
0 Kudos
Reply
4 Replies
Workflow Hero

Re: Forms: Repeating Section

Jump to solution

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

Reply
Workflow Hero

Re: Forms: Repeating Section

Jump to solution

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... 

Reply
Workflow Hero

Re: Forms: Repeating Section

Jump to solution

Thanks, simple and works!

Reply
Workflow Hero

Re: Forms: Repeating Section

Jump to solution

Anytime

0 Kudos
Reply