Jeff Odom Posted December 16, 2020 Share Posted December 16, 2020 I have multiple resources that are location addresses. I need to change the numberfont to a different font than the text. I have tried to apply Dan's suggestion in this thread: http://forums.pti.com/showthread.php?t=1720&highlight=Proportional+Liningvar numberFont = "Arial"; var text = NormalizeEntities(Rule("Change phone format Rule")); return text.replace(/(\d+\s*)/g, function(d){return '<f name="' + numberFont + '">' + d + '</f>';});but when changing Rule("Change phone format Rule") to Resource("Washington") it just returns "Resource("Washington"). Any suggestion on how I can apply the change numberfont rule to a resource? Quote Link to comment Share on other sites More sharing options...
dreimer Posted December 17, 2020 Share Posted December 17, 2020 I think you need to use Dan's rule up further in the post. You are using a rule for a different question about Phone numbers, not the numbers in an address field. var numberFont = "Arial"; var text = NormalizeEntities(Field("Add1")); return text.replace(/(\d+\s*)/g, function(d){return '<f name="' + numberFont + '">' + d + '</f>';}); Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted December 17, 2020 Share Posted December 17, 2020 var text = Resource("Washington").content; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.