Hello there,
I have this form in which the user has to enter some codes (letters and numbers) in some textfields, and what I need is those codes to appear on every page of the form (as long as the name, last name, etc which I managed to make them appear all over the form by using global bindings, thanks to this forum ) on another TextField, but they have to appear like this: CODE01, CODE02, CODE03
Ant ideas on how to make this? I guess is something to do with arrays or so, but have very little knowledge on this.
Thanks!
Views
Replies
Total Likes
Hi,
I need more information. When have to appear th CODE01, CODE01?
Views
Replies
Total Likes
hi! as soon as the user finish enetering the codes on the first page, they automatically have to appear on the header on the remaining pages, this anwser your question?
Views
Replies
Total Likes
Hi,
soory but my english is not the best.
I thought yo solved this problems with global binding?
For example:
I thought you need a code as:
switch(CodeEnter.rawValue)
{
//The user enter the following string -> Variant 1 -> then the target field will filled with CODE01
case "Variant 1":
YourTargetField.rawValue = "CODE01";
break;
//The user enter the following string -> Variant 2 -> then the target field will filled with CODE02
case "Variant 2":
YourTargetField.rawValue = "CODE02";
break;
//You could use the case "": so often you want
}
Could I help you?
Mandy
Views
Replies
Total Likes
Mandy, thanks! but the thing is that i need the value from several inputs (text fields) to be merged in to one text field:
Suppose I have:
I need this values to appear on TextField04 like this code01, code02, code03
Is this more clear?
Views
Replies
Total Likes
In the calculate event of TextField04 you can put the following JavaScript:
this.rawValue=TextField01.rawValue+", "+TextField02.rawValue+", "+TextField03.rawValue;
Kyle
Views
Replies
Total Likes
Kyle was faster then I but I would write the same . He's right.
Kind regards Mandy
Views
Replies
Total Likes
Sorry. Didn't mean to intrude...
Kyle
Views
Replies
Total Likes
Thanks kyle!
It works perfectly, now I have another issue, suppose I regret and I delete one of the codes I entered previously, i.e. the code from TextField01. I´m getting in the TextField04: CODE01, null, CODE03
Any ideas on how to fix this?
Views
Replies
Total Likes
this.rawValue=(TextField01.isNull?"":TextField01.rawValue)+(TextField02.isNull?"":", "+TextField02.rawValue)+(TextField03.isNull?"":", "+TextField03.rawValue);
Kyle
Views
Replies
Total Likes
@Kyle: Everything is ok. It's only important that it gives an helpful answer..
Kind regards from Germany, Mandy
@Kyle: JSP/JSPL-Syntax. I used this one year ago. It's a very good idea to use for this. Method "isNull" I don't used for a long time and forgot it. Great idea to use this method. I will give you a helpful click
But I have one question.I culdn't find in the LCD-help.
Thx Mandy
Views
Replies
Total Likes
Thanks again!
But now I get onyl values from 2 and 3, not the first one. I´m trying but I can´t figure it out....
Views
Replies
Total Likes
Here's a slight improvement that's a bit more verbose:
myArray=[];
for (var a=1;a<4;a++){
if (xfa.resolveNode("TextField0"+a).rawValue!=null && xfa.resolveNode("TextField0"+a).rawValue!=""){
myArray.push(xfa.resolveNode("TextField0"+a).rawValue);
}
}
this.rawValue=myArray.join(", ");
Kyle
Views
Replies
Total Likes
I can´t geit to work either....
instead of TextField0 I use form1.Subform1.TextField
Views
Replies
Total Likes
@elunicotomas:
This is no problem.
Rename your textobject in
Then it will works.
When you use xfa.resolveNode form1.Subform1 is not necessarily.
@Kyle:
Cool. Really. Thx.
Views
Replies
Total Likes
If you want, I can have a look...
You can upload it here:
http://www.fieldeffecttechnologies.com/pdfupload/
Kyle
Views
Replies
Total Likes
Kyle, thanks again for all your help!
I finally used one of the first options you suggested:
this.rawValue = (form1.Subform1.TextField8.isNull?"":form1.Subform1.TextField8.rawValue)
+(form1.Subform1.TextField9.isNull?"":", "+form1.Subform1.TextField9.rawValue)
+(form1.Subform1.TextField10.isNull?"":", "+form1.Subform1.TextField10.rawValue)
+(form1.Subform1.TextField11.isNull?"":", "+form1.Subform1.TextField11.rawValue)
+(form1.Subform1.TextField12.isNull?"":", "+form1.Subform1.TextField12.rawValue)
+(form1.Subform1.TextField13.isNull?"":", "+form1.Subform1.TextField13.rawValue)
//and so on, until the last field
It´d be nice to have it done by using the last piece of code you wrote, the one with the array and the loop, but i couldn´t make it work
Thanks!
Views
Replies
Total Likes
Name all of the text fields you wish to merge 'TextField' (not the field performing the calculation) and use this:
myArray=[];
for (var a=0;a<TextField.all.length;a++){
if (xfa.resolveNode("TextField["+a+"]").rawValue!=null && xfa.resolveNode("TextField["+a+"]").rawValue!=""){
myArray.push(xfa.resolveNode("TextField["+a+"]").rawValue);
}
}
this.rawValue=myArray.join(", ");
Kyle
Views
Replies
Total Likes
Views
Likes
Replies