Jump to content

Find & Replace within scripts


Paola

Recommended Posts

I had written many rules for previous jobs I have done. Now I'm using some of those rules in a new job, but now I have slightly different field names in my data list that I can't change. Is there a way in fusionPro to find & replace the field name everywhere that field appears in all the rules?
Link to comment
Share on other sites

You can export the .def file from the job (FusionPro -> Export -> Data Definition). Then you can carefully edit it in a text editor. Finally, you can re-import the modified .def file with the Data Source Wizard: FusionPro -> Data Definition > Wizard, click on "Import a data source from another document," then Next, and browse to the file.

 

Note that, in the .def file, all the rule contents are escaped for XML markup, so calls to the Field function will look like this:

[noparse]Field("Destination")[/noparse]
But if you just change the field names, and leave everything else, it should work.

 

That said, I would back up the original PDF template first. It's very easy to mess up the .DEF file by hand-editing it, and you could make it unusable that way.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...