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

Writing and if then else statement

Avatar

Avatar
Validate 1
Level 1
gretchenhs42
Level 1

Like

1 like

Total Posts

51 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
gretchenhs42
Level 1

Like

1 like

Total Posts

51 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
gretchenhs42
Level 1

11-06-2015

I know this is a lot easier than I'm making it, but I've been trying to figure out the correct syntax all afternoon.

I have a table with 15 rows, if the column Change15 is = R, then I want column FarmDes15 to be visible

Any other value I want it to be invisible.

I have...

if ($.boundItem(xfa.event.newText) == "R") {

  this.resolveNode("FarmDes15").presence = "visible";

} else {

  this.resolveNode("FarmDes15").presence = "invisible";

}

which works, but whenever I choose a value for Change, it clears out all the other fields on the form.

Please help if you don't mind.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 1
gretchenhs42
Level 1

Like

1 like

Total Posts

51 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
gretchenhs42
Level 1

Like

1 like

Total Posts

51 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
gretchenhs42
Level 1

15-06-2015

I finally figured this out.

if ( this.boundItem ( xfa.event.newText ) == "R")

{

    FarmDes1.presence = "visible";

}

else

{

    FarmDes1.presence = "hidden";

}

Answers (0)