Expand my Community achievements bar.

SetValue QPAC

Avatar

Former Community Member
howdy,



We've got our workflow up and going and I wanted to add some bells & whistles. The first person in the workflow is going to enter their Social Security number to a field. As the form goes through the workflow, I don't want anyone else to see the SS number until it gets to the last step.



I figured the best way to do this was with the SetValue QPAC and set the field on the form to invisible.



Does that sound right? Anyone have any other ideas?



Thanks!



scott
6 Replies

Avatar

Level 9
Hi Scott

You can't set a field to invisible directly usign the SetValue QPAC.

You can however, set a field something like: DisplaySSN to either true or false using SetValue. Then in your form, you can have some Javascript that sets SSN.presense to either "visible" or "hidden" depending on the value of DisplaySSN.



Howard

http://www.avoka.com

Avatar

Former Community Member
hey howard,



thanks for the help.



i'm not much of a programmer. i'm about halfway there. i've got the QPAC passing the values, but i'm having a tough time making the field display or not display.

Avatar

Level 9
Hi Scott

Make sure that you save your file as "Dynamic PDF", then resave as "XDP".

Your code will look something like this:

txtShowSSN: on form:ready

if (this.rawValue == "show") {

txtSSN.presence = "visible";

} else {

txtSSN.presence = "hidden";

}



Check the spelling of presence, I can never remember if its an s or a c.



Howard

Avatar

Former Community Member
Yeah, I guess I'm even worse of a programmer than I thought. I'm totally lost now.



#1) Do I have to make a "displayssn" variable under "Variables" in workflow? Or should I do it in the Varibles under the form Properties?



#2) Do I have to tie my new "displayssn" field into the XDP schema?



Thanks for all your help.

Avatar

Former Community Member
Thanks Howard and anyone else who read this.



I figured it out - the LiveCycle wasn't updating the XML schema as fast I thought it would. I just had to close out of my workflow and make sure I refreshed. Then my data was all good again and I could pass a show/hide variable through the workflow.



scott

Avatar

Former Community Member
scott_calonico@adobeforums.com wrote:

> Thanks Howard and anyone else who read this.

>

> I figured it out - the LiveCycle wasn't updating the XML schema as fast I thought it would. I just had to close out of my workflow and make sure I refreshed. Then my data was all good again and I could pass a show/hide variable through the workflow.

>

> scott



Scott,

Be careful with this approach...you may be introducing a security hole. Even though the field is

hidden, someone with Acrobat could export the XML and see the social security number. A more secure

method of protecting the social security number would be...

- Allow the first person to enter their SSN and submit the form

- In Workflow, extract the SSN and store it as a separate process variable

- Clear the SSN field on the form

- At the end of the workflow, repopulate the SSN field on the form from the stored variable



--

Justin Klei

Cardinal Solutions Group

www.cardinalsolutions.com