Hi.
I understand that .presence controls screen appearance and .relevant controls printing. Here's a sample from the Scripting Basics guide:
switch(xfa.event.newText) {
case 'Invisible':
Subform1.nodes.item(nCount).presence = "invisible";
break;
case 'Hidden (Exclude from Layout)':
Subform1.nodes.item(nCount).presence = "hidden";
break;
case 'Visible (but Don\'t Print)':
Subform1.nodes.item(nCount).presence = "visible";
Subform1.nodes.item(nCount).relevant = "-print";
break;
case 'Invisible (but Print Anyway)':
Subform1.nodes.item(nCount).presence = "invisible";
Subform1.nodes.item(nCount).relevant = "+print";
break;
default:
Subform1.nodes.item(nCount).presence = "visible";
break;
So the example covers Hidden, Visible (but don't print and Invisible (but print anyway).
But how does a script set an object to be visible AND print? It appears that anything like:
this.relevant="+print";
causes an object to disappear from the screen, and
this.presence="visible";
will not bring it back.
Thanks.
Views
Replies
Total Likes
+print is for print only!! (visible print only) so it doesnt appear on the form
Here's a link to help you understand:
http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000826.html
Views
Replies
Total Likes
Yeah, I've seen that. I'm just surprized that there isn't a combination to set an object visible in both views.
Views
Replies
Total Likes
Hi,
I think you will need to set the relevant property to an empty string
this.relevant="";
Regards
Bruce
Dang, Bruce, every time I come here to ask a question you nail it dead on.
You really ought to be writing documentation for Adobe. ;-)
It astounds me that such a simple concept isn't found in Adobe's docs, printed or online, nor in any blogs that I searched.
But in a dusty corner of Bruce's brain....gold.
Thanks.
Views
Replies
Total Likes
Hi,
It's pretty hard going at times and sometimes includes things that haven't been implemented in Acrobat/Reader but remember to check out the XFA spec http://partners.adobe.com/public/developer/xml/index_arch.html
This explains about the empty string value but also talks about user defined views (not just print / screen) which would be very handy way of hiding some fields under certain conditions so you could define a "summary" view for example ... but that bit hasn't been implemented.
Bruce
Views
Replies
Total Likes