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

Need help with the "Stuff" function

RichLorn
Registered: May 19 2008
Posts: 46

I'm using FormCalc.
 
A user enters a phone number in textField1, with the object pallet display, edit and validation fields for a phone number enabled. This number is read by textField2, but displays the phone number in a string of 10 digits (no formatting). I want testField2 to add a parenthesis around the area code of the phone number. I've tried...
Adding the object pallet binding data pattern for phone # in textField1. - No change to results.
Added a calculation event script to textField2: Stuff($.rawValue,1,0,"(") - This added the open parenthesis to the number displayed in textField2, ok fine...
BUT when I add the second Stuff function following the first: Stuff($.rawValue,1,0,"(") [next line] Stuff($.rawValue,4,0,")"), the closed parenthesis appears at position 4 but the leading parenthesis is lost.
 
What am I missing?

My Product Information:
LiveCycle Designer, Windows
RichLorn
Registered: May 19 2008
Posts: 46
Sorry, never mind. I doped it out myself using intermediate variables.