on ‎2010 Jan 18 7:36 AM
Dear all,
I am working on PO form, which a ZFORM. I have to print the long description of the Material PO text and PO Item text. For this i have taken 2 tables, table1 will contains the item level data and table 2 will contain the long descriptions. Table 2 i put in a subform. As of now this is working fine. But the problem is when the table2 is empty, still the space is printing on the form. To overcome this issue i wrote JAVA script on the table1 to hide the subform of table2. its not working fine. The code is as follows. Please do let me know whether the code is correct or not.
var norows = xfa.resolveNodes("data.ZLINE_ITEM.DATA[*]").length;
var no;
for ( var i=1; i<=norows; i++)
{
no = xfa.resolveNodes("data.ZLINE_ITEM.DATA<i>.SS.GT_ILTEXT.DATA[*]").length;
if(no == 0)
{
xfa.resolveNodes("data.ZLINE_ITEM.DATA<i>.SS").presence = "hidden";
}
}
I wrote this code in 'Calculate' event.
Language - JAVA script
Run at - Client
Request clarification before answering.
You send the text into a text field. Lets have a text field with the name TST.
You test the value like (if TST.rawValue = NULL || TST.rawValue = "")
you react like TST.presence = "hidden";
if you place the script on every text field it should hide, you can simplify things using this.rawValue and this.presence and you don´t have to loop at the table.
Otto
p.s.: start reading here: http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_ba...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.