PDA

View Full Version : Darwin Custom Functions


mdpotter
04-23-2010, 01:55 AM
I know that you can create custom functions by creating additional xjs files however has anybody else been able to create any effectively?

I've been able to create a couple but I'm trying to get a function to add new lines infront of (or behind) a field value. Using Concatenate with return characters on OS X Darwin 3 crashes the application so creating a custom rule seems the only solution. Unfortunately, I cannot find the correct variation of character code for it to work: \n, \r, , , etc…

Any help would be greatly appreciated.

DigitalJuan
03-22-2012, 04:17 AM
I understand that it's too late... but here is the example:

function linebreak()
{
var pref = arguments[0];
var str = arguments[1].toString();
return pref+"\r"+str;
}
linebreak({0});

By using two parameters (text) it'll return a string that hase new paragraph in it.