Formula for testing for file name

S

Stripe-man

Ok guys.. i have read and read and am pulling out my hair...

I have an info path form that has repeating file attachment section.
I also have a text box above it (outside the repeating section) to
count the number of times its repeated (number of attachments).

The text box has this simply formula: count(Evaluations). Easy
enough it (as stated) returns the number of times you clicked on the
link to insert another item.

However, The number counted in the text box should ONLY reflect the
number of actual files attached (or that has a filename not null). If
you keep clicking on that link to insert items count(Evaluations).
will continue to increment (of course).

So my question is.. how do I only increment IF there is a file
actually attached to the form?

Bonus question: How keep that repeating section from repeating again
till a file is actually attached?

Thanks for any pointers...

Below is a function i was working on but only works on the initial
section and not on subsequent sections. (its also appending text that
I dont want appended. I broke it down a bit, hopefully it makes it
easier to read:


concat(
substring(
(
count(
EvaluationSection //Count how many fields inserted
) + 1
) - 1, 1, //one added and then taken away because it expects a
comparison
(
string-length(.) > 0
) * string-length("Success")
),
substring(
"Undefined", 1, (
not(
string-length(
Evaluations
) = 0
)
) * string-length("Undefined")
)
)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top