Hi, I am working in LiveCycle ES4 Designer. I have an issue with combining rawValue data from multiple fields into one field. I am VERY green when it comes to javascript. Please Help!
Thanks so much for any help!!!
Views
Replies
Total Likes
Before concatenating strings, check the value middle initial. If it is null, use the expression:
this.raValue = FirstName.rawValue + LastName.rawValue;
Views
Replies
Total Likes
Still Very green with javasript. sorry...
How do I check the value?
Views
Replies
Total Likes
OK, by sheer dumb luck, I managed to come up with something that works....
this.rawValue = FirstName.rawValue + " " + MidInitial.rawValue + "." + " " + LastName.rawValue;
if (MidInitial.rawValue == null){
this.rawValue = FirstName.rawValue + " " + LastName.rawValue;
}
Have a good one!
Views
Replies
Total Likes
Use this:
if (MidInitial.rawValue == null) {
this.rawValue = FirstName.rawValue + LastName.rawValue;
}
else {
this.rawValue = FirstName.rawValue + MidInitial.rawValue + LastName.rawValue;
}
Views
Replies
Total Likes
This is what I use:
this.rawValue = (FirstName.isNull ? "":FirstName.rawValue+" ") + (MidInitial.isNull ? "":MidInitial.rawValue+" ") + (LastName.isNull ? "":LastName.rawValue);
Both work.
Kyle
Views
Replies
Total Likes
Neat one Kyle!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies