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

How to hide a button based on a zero count of a unrelated subform?

Avatar

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile
chrisb29762052
Level 1

03-05-2015

I am a beginner at this. Try many different ways with no success. I found the following info in an old discussion group. There was no info to indicate that it worked. 

It is not exactly what I need. I tried to adapt it with no success.


" in the click event of the remove button should have something like this

if (this.parent.instanceManager.count > 1){

  this.parent.instanceManager.removeInstance(this.parent.index);

} else{

  xfa.resolveNode("Subform1[0].cmdRemove").presence = "hidden";

  this.parent.instanceManager.removeInstance(this.parent.index);

}

And you should have an initialize event for the subform

if (this.instanceManager.count > 1){

  xfa.resolveNode("Subform1[0].cmdRemove").presence = "visible";

} else{

  xfa.resolveNode("Subform1[0].cmdRemove").presence = "hidden";

}

I basically want to hide a button if the count of a subform get to zero. The subform has a start of zero count. If somoene decide to delete all the said subform, I need the targeted button to be "hidden". Any assistance would be much appreciated.

View Entire Topic

Avatar

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile
chrisb29762052
Level 1

04-05-2015

It works as you described. Thanks