Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Concatenating Textfields with buttonclick and Javascript

Avatar

29-01-2009

Hi,I´ve tried to create a simple example with three textfields. I wan´t to write two texts (givenName and surName) that puts the string value in the third field when I click on a button. How can I access the stringvalue in designer? I place the script on the button and click event but can´t get it to work. How can the script look like? What method can I use that work? I´ve tried rawValue, value and toString but don´t get it to work.



I would be very thankful for some help.



Rikard

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

29-01-2009

I prefer to write my code in javascript so here it is. Lets assume your fields are called FName, LName and Name.



On the calculate event of the Name field enter this code:



Name.rawValue = FName.rawValue + " " + LName.rawValue;