Copy link to clipboard
Copied
I have two fields "name" and "grade". Name is a standard text entry and grade is a drop down that allows the user to pick one grade. The name is used in several places in my form. Some of the places the name is proper case (example: Tim Smith) and some spots it needs to be upper case (example: TIM SMITH). I can do the upper and proper case no problem. What I can't seem to figure out is how I can combine these two fields with the "name" field capitalized and the grade the same as it is in the drop down. The field "grade" must always be as it is in the list. The only way I see to do this is the toUpperCase method, which works but changes the grade. When I do that I get - "TIM SMITH SGT", but I need it to say "TIM SMITH Sgt". I thought about just placing two fields next to each other but this needs to be in a specific part of the form and with names being different sizes, it won't work. Can anyone assist with this???
Set only first field to uppercase:
event.value = this.getField("name").valueAsString.toUpperCase()+" "+this.getField("grade").valueAsString;
Copy link to clipboard
Copied
Set only first field to uppercase:
event.value = this.getField("name").valueAsString.toUpperCase()+" "+this.getField("grade").valueAsString;
Copy link to clipboard
Copied
YES!!! thank you