Expand my Community achievements bar.

SOLVED

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

Avatar

Level 1

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!

1 Accepted Solution

Avatar

Correct answer by
Employee

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

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

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