Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Check if any instances of a field in a table are empty?

$
0
0

I'm having an issue with checking if any the instances of a field within a table are empty. If any are empty I need a message box to appear. There's one header row and one body row with several text fields. The body row is set to repeat and there are buttons to add and remove body rows.

 

I have had success in checking if any fields are empty in the initial row by using the following code:

 

if ((this.resolveNode("Page1.Table1.Row3.TextField1").rawValue ==null|| this.resolveNode("Page1.Table1.Row3.TextField1").rawValue == "") || (this.resolveNode("Page1.Table1.Row3.TextField2").rawValue ==null|| this.resolveNode("Page1.Table1.Row3.TextField2").rawValue == "") || (this.resolveNode("Page1.Table1.Row3.TextField3").rawValue ==null|| this.resolveNode("Page1.Table1.Row3.TextField3").rawValue == "") || (this.resolveNode("Page1.Table1.Row3.TextField4").rawValue ==null|| this.resolveNode("Page1.Table1.Row3.TextField4").rawValue == ""))

{xfa.host.messageBox("Please complete the Evaluation/Implementation table.", "Form Incomplete", 1);}

 

I'm guessing that for all instances to be checked I must use the "resolveNodes" function however I haven't been able to get it to work. This is what I've tried:

 

if ((this.resolveNodes("Page1.Table1.Row3.TextField1").rawValue ==null|| this.resolveNodes("Page1.Table1.Row3.TextField1").rawValue == "") || .........)

 

Although this doesn't work since .rawValue isn't a function that work with resolveNodes (only resolveNode).

 

What code should I be using for this?

 

 

Thanks in advance for any advice.


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>