_Row1.count (working) VS Row1.instanceManager.count (not working)

Avatar

Avatar
Level 1
bob_w1
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
bob_w1
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
View profile
bob_w1
Level 1

15-12-2020

Hello Everybody! 

This is my first thread in Adobe community, so I would like to say Big Hello!

Have not much experience with LiveCycle Designer so far

currently trying to implement a very basic functionality

that is 'hide Table object in case it contains no data/Rows'

 

have implemented this for subform (and this is working fine, subform gets hidden when data table is empty)

 

if( this.Table1._Row1.count == 0) { this.presence = 'hidden'; } 

 

 

could you pls briefly explain why the below one is not working?I thought it's the same, just different syntax:

 

if( this.Table1.Row1.instanceManager.count == 0) { this.presence = 'hidden'; } 

 

 

Your comments very much appreciated!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 100
Employee
Kosta_Prokopiu1
Employee

Likes

165 likes

Total Posts

371 posts

Correct reply

107 solutions
Top badges earned
Affirm 100
Validate 1
Establish
Give Back 5
Give Back 3
View profile

Avatar
Affirm 100
Employee
Kosta_Prokopiu1
Employee

Likes

165 likes

Total Posts

371 posts

Correct reply

107 solutions
Top badges earned
Affirm 100
Validate 1
Establish
Give Back 5
Give Back 3
View profile
Kosta_Prokopiu1
Employee

15-12-2020

Theoretically it works the same BUT when you have 0 Row1 instances it makes a difference because the instanceManager has no object link when there are 0 Row1s and causes an error:

GeneralError: Operation failed.
XFAObject.Row1:3:XFA:form1[0]:#subform[0]:initialize
Invalid property get operation; instanceManager doesn't have property 'Row1'

_Row1 on the other hand points "directly" to the Row1 definition and therefore there is no exception. Why that is I cannot explain - just that it is like that 🙂

Answers (0)