Thread: I'm Having Trouble Storing User-Defined Functions
View Single Post
Old June 29th, 2022, 07:11 AM
Dmiller35 Dmiller35 is offline
Junior Community Member
Join Date: Jun 2020
Location: South Carolina, USA
Posts: 17
Default Storing User-Defined Functions

I've read in the user guide that I can supposedly add a .js file to the Plugins folder so that I can have my most common functions easily available.
However, I've never been able to get it to work. I write the file just as the guide says, but it seems to have an issue with Line 1. Here is what I'm trying to use. Whenever I pull up the building blocks, it tells me "line 1: SyntaxError: illegal character:"

Presets = new Object;
Presets.LBLNUM =  function (str)
	return Int(Field(\“LBLNMBR\”));
Presets.LBLNUM.description = “Remove Leading Zeroes from Label Number”
Presets.LBLNUM.syntax = "LBLNUM(<string>)";
I've found in other places that sometimes the user guides have typos or are missing something in order to get the code to work correctly. Is that the case here or does this function just not work?
FusionPro VDP Creator 12.1.0 | MacOS 10.14.6 | Acrobat DC

Last edited by Dmiller35; June 29th, 2022 at 08:03 AM..
Reply With Quote