PDA

View Full Version : Apply Point Size In Rule


dreimer
November 20th, 2012, 06:46 AM
I want to create an IMB Rule and place it into the RulesTemplate.English.js file and not have to assign the point size every time. So I would like to have that set in the Template rule. I know this is probably simple but, just not able to figure it out, below is my code and I want to assign the point size of 16. Thanks.

return '<f name="USPSIMBStandard">' + Field("Intelligent Mail barcode")

step
November 20th, 2012, 07:54 AM
return '<f name="USPSIMBStandard"><z newsize="16">' + Field("Intelligent Mail barcode");

dreimer
November 20th, 2012, 07:57 AM
Perfect thanks step. I promise I will continue to try and remove the novice from my signature!!!!

dreimer
November 20th, 2012, 08:22 AM
Actually, it works for the one off job, but now I need to figure out how to add it to the RulesTemplate.js file. Not cooperating right now.

Got it, some simple little differences in the rule editor and the .js file can be annoying.

step
November 20th, 2012, 09:15 AM
Paste this into the js file:


FusionPro.RuleTemplates["IMB"] =
{
description:
"Returns formatted IMB Field",
syntax:
"// Change field name to match your data.\n" +
"return \'<f name=\"USPSIMBStandard\"><z newsize=\"16\">\' + Field(\"Intelligent Mail barcode\");"
+ "\n",
istext:1,
isgraphic:0
}

dreimer
November 20th, 2012, 09:18 AM
Thanks for that step, but I have already figured it out and have it set to always use the same field name since it will always be the same field coming in from my presorting software used to create the IMB.