Hello - I have been searching high and low for the answer to this, and I feel like I have come close, but I can't quite get there. I am not skilled enough in JS or LiveCycle.
All I am wanting to do is stitch together the text from multiple new instances of one field. I have a table that clients fill out their names, but the number of clients on the account can vary. If there are three clients on the one account, I just need to combine those names into one field later on down the form (and use it as a floating field).
So I have:
And the result needs to be something like:
Account Update for [ Fred Jones, John Smith, Jim Andrews]
I would collect that in an invisible field and show it in a floating field on the top of the form.
Would anyone be able to help me? This feels like is should be fairly straight forward but, like I said - I am not great at this.
Thankyou!
Solved! Go to Solution.
Here's another approach;
var aValues = "";
var list = this.resolveNodes("table.Row1.[hasValue(field)]")
for (var i = 0; i < list.length; i++) {
aValues += list.item(i).field.rawValue + " ";
}
this.rawValue = aValues;
This uses the HasValue function to ignore any blank values and only calls the resolveNode(s) once, which will be quicker,
Regards
Bruce
I think I worked it out if anyone else is looking:
var nRows = table._Row1.count;
var aValues = " ";
for (I=0; I< nRows; i++)
{
aValues = aValues + xfa.resolveNode("table.Row[" +i+"].field").rawValue + " ";
}
this.rawValue = aValues;
Now I just have to stop it showing "null" when its blank and I am away
Here's another approach;
var aValues = "";
var list = this.resolveNodes("table.Row1.[hasValue(field)]")
for (var i = 0; i < list.length; i++) {
aValues += list.item(i).field.rawValue + " ";
}
this.rawValue = aValues;
This uses the HasValue function to ignore any blank values and only calls the resolveNode(s) once, which will be quicker,
Regards
Bruce
Bruce, thank to you so much! That's brilliant...
Nat
Views
Replies
Total Likes
Views
Likes
Replies