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

JavaScript function like "slice"

SLDC
Registered: Oct 25 2010
Posts: 70
Answered

Browser JavaScript strings have a string.slice() method that lets you cut out some characters from a string. Is there a LiveCycle Designer equivalent, or something similar? I need to strip the first four characters off a string.
 
Thanks,
SLDC

My Product Information:
LiveCycle Designer, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1875
Accepted Answer
You can use the same method in LiveCycle Designer.
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You need to set the "Language" option in LiveCycle Designer to "JavaScript" and the 'slice', 'substr', and 'substring' methods will all work.

If you set the "Language" option to "FormCalc" then you need to use the 'Substr" function. But you COULD write a 'slice' function for the form.

George Kaiser

SLDC
Registered: Oct 25 2010
Posts: 70
Thanks!