These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Hiding columns/fields in the response portfolio after you distribute your form

mikruzo
Registered: Feb 15 2011
Posts: 14
Answered

see response below you can read my original post more easily instead of down the right hand column side
mike

mikruzo

My Product Information:
LiveCycle Designer, Windows
mikruzo
Registered: Feb 15 2011
Posts: 14
Originally, I did get a response from Thom (see after post below)
However i got an error when trying his answer (see below)

I have a 10 page from that has about 100 radio buttons (yes/no) in it. After someone submits the form and I open my response portfolio the only columns/fields I want to see is the name, date, age and exclude all the radio buttons. Can you set an option LC ES before you distribute the form?

I have found I can do this within the portfolio pdf, but only going to modify---view-then unchecking what I do not want to see…………BUT it is ONLY one at a time. If there is another way of doing it LET ME KNOW!!

Thanks
mike


The response file is a collection. But unfortunately it can't be edited, at least not easily. You can remove a column with a script run in the console window.

this.collection.removeField("FieldName");

The field name is typically the name displayed at the top of the column.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
The JavaScript Console Window (Video tutorial)


Thom

Being that i am a very beginer at java script. I got an error that this.collection is undefined
is this suposed to be the name of the response PDF?

Also is thier a way to hide the From and Recieved Date columns

thanks
mike


TypeError: this.collection is undefined
1:XFA:form1[0]:#subform[0]:App_City[0]:initialize
TypeError: this.collection is undefined
1:XFA:form1[0]:#subform[0]:App_State[0]:initialize
TypeError: this.collection is undefined
1:XFA:form1[0]:#subform[0]:App_Zip[0]:initialize
TypeError: this.collection is undefined

mikruzo

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The code I provided must be run against the Response file, not the form. And it must be run from the console window. To do this the "Data Summary" must be displayed in Acrobat, not one of the collected data forms.

And yes, the From and Recieved Date can be removed in the same way, you just need to know the names.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

mikruzo
Registered: Feb 15 2011
Posts: 14
Thom

I really have been trying to figure this out on my own but i am still getting undefined

I have my response.pdf open in Acrobat X pro. I then hit Ctrl j with the view set to Console
I enter the code below, put the cursor on the line hit Ctrl enter and it returns undefined
What am I supposed to define?

here is a link to the response.pdf and after it opens all I want to display is the Project_Name Project_Description Project_Location and Applicant_Name

The way the pdf below opens to I assume is the "Data Summary"?

http://webgis.co.okaloosa.fl.us/website/okaloosagis/gm/DEVELOPMENT%20PROJECT%20STATUS%20REPORT_responses.pdf

thanks
mike

Acrobat JavaScript Debugger Functions Version 10.0
Acrobat EScript Built-in Functions Version 10.0
Acrobat SOAP 10.0

this.collection.removeField("From");
this.collection.removeField("Received Date");
this.collection.removeField("Permit_Number");
this.collection.removeField("App_Address");
this.collection.removeField("App_City");
this.collection.removeField("App_State");
this.collection.removeField("App_Zip");
this.collection.removeField("App_Ph_Num");


undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined

mikruzo

UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
To refer to "this.collection" in a script you must be viewing the Cover Sheet of the portfolio (choose it from the Edit menu).
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Actually, if the executed code is returning "undefined" then you are in the right place. If the columns are not being removed, then the names are incorrect.

Run this code in the console window

this.collection.fields.toSource();

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

mikruzo
Registered: Feb 15 2011
Posts: 14
Accepted Answer
YEA!!!!!!!!!!!!

Thanks that code worked to get the correct names

I would have never guessed the name see below

this.collection.removeField("From"); ......................................@@RespondentName@@
this.collection.removeField("Received Date");..............................@@ReceivedDate@@
this.collection.removeField("Permit_Number");.......TopmostSubform[0].Page1[0].Permit_Number[0]
this.collection.removeField("App_Address");.........TopmostSubform[0].Page1[0].App_Address[0]
this.collection.removeField("App_City");............TopmostSubform[0].Page1[0].App_City[0]
this.collection.removeField("App_State");...........TopmostSubform[0].Page1[0].App_State[0]
this.collection.removeField("App_Zip");.............TopmostSubform[0].Page1[0].App_Zip[0]
this.collection.removeField("App_Ph_Num");..........TopmostSubform[0].Page1[0].App_Ph_Num[0]


THANKS AGAIN!!

Mike


mikruzo