Page 1 of 1

Global alias for carriageReturn lineFeed

Posted: Mon Feb 09, 2015 11:28 am
by atarrant
Hello,

I finding in my projects that whenever I'm creating messages I'm constantly having to add this to the end of each line:

${system.carriageReturn}${system.lineFeed}

This is a bit cumbersome and makes the messages in Director a bit cluttered. I found I could alias this to ${EOL} with the following Set Variable.

<setVariable label="Set EOL" name="EOL" value="${system.carriageReturn}${system.lineFeed}" version="2.0" />

However it would be nice if I could create some kind of global variable for this. Any thoughts on how that could be done?

Thanks!

Re: Global alias for carriageReturn lineFeed

Posted: Thu Feb 19, 2015 9:59 am
by Support_Rick
Andrew,

The only way I know of to get this type of functionality would be to create a "Global Variables" project and put it into your "Utilities" folder. Then when doing your initial project setup, make a call to that Global Variables project and have it return variables to your job.

This could be useful for generating popular values as well.

Some ideas include variables like ...

CRLF = ${ Concat( system.carriageReturn, system.lineFeed ) }
date_ISO = ${ CurrentDate( 'yyyy-MM-dd' ) }
date_USA = ${ CurrentDate( 'MM/dd/yyyy' ) }
date_Day = ${ CurrentDate( 'dd' ) }
date_Month = ${ CurrentDate( 'MM' ) }
date_Year = ${ CurrentDate( 'yyyy' ) }
Server = ${ If( Contains( system.Environment, 'PROD', false ), 'ProdServer', 'TestServer' ) }