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

Unable to set the value of a textbox from Folder-Level javascript

Avatar

Avatar
Boost 1
Level 1
dada1221
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
dada1221
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
dada1221
Level 1

05-08-2016

Hello!

I am trying to set the value of a textbox from a Folder-Level javascript but the value does not change on the textbox.

I am able to get the current value but unable to change the value.

This works when I run it from livecycle but not from Folder-Level.

function Test()

{

     var txtResultField = this.getField("form1[0].#subform[0].txtResultField[0]");

     var text = txtResultField.value;

     app.alert(text); //I get the correct current value of the textbox

     txtResultField.value = "abc123"; //Unable to set value here. I also tried with rawValue and valueAsString

     //I also tried to do this.getField("form1[0].#subform[0].txtResultField[0]").value = "abc123"; and it didn't work either.

}

app.addMenuItem({cName:"-", cParent:"Help", cExec:" "});

app.addMenuItem({cName:"Get Field Value", cParent:"Help", cExec:"Test();"});

This is my textbox:

998160_pastedImage_12.png

Any help would be appreciated!

Thank you!

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Boost 1
Level 1
dada1221
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
dada1221
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
dada1221
Level 1

09-08-2016

Bump?

Thank you