How to count nonblank lines in Repeated Grid?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to count nonblank lines in Repeated Grid?

czajw

I'm just starting to get to know Orbeon Forms. I would like to count lines that are not filled in the Repeated Grid in In the Calculated Value control. I am using the count-non-empty function. While the formula works for me in Form Builder (test), when I click Publish it doesn't work and counts empty lines. I use the Orbeon Forms CE version

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/125301d3-c43e-43ac-9eda-a929ed7c9450o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: How to count nonblank lines in Repeated Grid?

czajw
Here is my form: (if all - from x1 to x8 must be counted)

W dniu poniedziałek, 22 czerwca 2020 10:09:50 UTC+2 użytkownik Władysław Czaja napisał:

I'm just starting to get to know Orbeon Forms. I would like to count lines that are not filled in the Repeated Grid in In the Calculated Value control. I am using the count-non-empty function. While the formula works for me in Form Builder (test), when I click Publish it doesn't work and counts empty lines. I use the Orbeon Forms CE version

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/ab04630f-4902-4877-9087-38737375bc9fo%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: How to count nonblank lines in Repeated Grid?

Alessandro  Vernet
Administrator
Hi Władysław,

What exactly constitutes a non-blank line? A line is non-blank if any of the
fields on that line is filled, or if they are all filled, or if a specific
one is filled? Or am I maybe misunderstanding what you're asking?

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1592887495308-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: How to count nonblank lines in Repeated Grid?

czajw
Hi Alessandro,

Thank you for the quick reply. In my case, I'm looking for a solution to count the lines where all are all filled. Of course, I am also interested in the case when a specific
one is filled, but this secondly

Even if I prepare a formula and it works in Form Builder (when I click the Test button), it does not work, if I want to publish (Publish button)

Besides, do you know any good tool for preparing xpath formulas? It seems to me that it is not easy to prepare formulas directly in Orbeon Forms, but maybe just because I think I'm just starting to get to know Orbeon Forms.

Vlad

W dniu wtorek, 23 czerwca 2020 06:44:57 UTC+2 użytkownik Alessandro Vernet napisał:
Hi Władysław,

What exactly constitutes a non-blank line? A line is non-blank if any of the
fields on that line is filled, or if they are all filled, or if a specific
one is filled? Or am I maybe misunderstanding what you're asking?

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: <a href="http://discuss.orbeon.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdiscuss.orbeon.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF5V5zfD-87RVoalaG4cqO_RzdDcA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdiscuss.orbeon.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF5V5zfD-87RVoalaG4cqO_RzdDcA&#39;;return true;">http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/d3710247-0460-4bf3-b12e-2ac04a9c9553o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: How to count nonblank lines in Repeated Grid?

Alessandro  Vernet
Administrator
Hi Vlad,

Got it; thank you for the additional details. So I think that an expression
as follows should do the trick:

    count(//children-iteration[count(*[xxf:is-blank()]) = 0])

And here are some more details about how this works:
https://youtu.be/LWCy7APEQg0

You'll let me know if this works for you!

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1593584398225-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: How to count nonblank lines in Repeated Grid?

Alessandro  Vernet
Administrator
Hi Vlad,

Did you get a chance to work on your form where you wanted to count the
number of non-blank lines / iterations? If so, did the technique I was
describing in my previous message work for you?

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1594227087503-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet