Show/Hide Toolbars

Jim2® Business Engine Help File

Having some text before the macro is optional, as well as text after the actual macro:

{{"Text before="Project.Meter.Counter.Name" "}} is valid

Example: {"Last Read="Project.Meter.Job.Previous Job.Meter Read" "}} will produce: Black Last Read - 50,000 in the stock grid and on the invoice

 

As well as:

{{"Some text before="Project.Meter.Min - Base TF" Some text after"}}

 

And:

{{Project.Meter.Min - Base TF" only additional text after"}}

 

Another example:

{{"e: "System.User.Email"

"}}{{"m: "System.User.ContactType=Mobile"

"}}{{"p: "System.User.ContactType=Phone"

"}}

 

Which will result in (user has phone but not Mobile contact type):

e: sys@duncan.local

p: 02 00000000

 

The ? Operator

This has two forms:

 

One where there is a true part and a false part:

{{<Macro to test>?<Value if true>:<Value if false}}

 

And another that just has a true part:

{{<Macro to test>?<Value if true>}}

 

The macro will be set to the value of the value if true part. If the macro to test evaluates to nothing, the macro will be set to the value of the value if false part, if it exists, eg.

{{Project.Meter.Min - Base TF?"There is a min charge!":"There is no minimum charge for this one"}}

 

The macro Project.Meter.Min - Base TF is evaluated. If it has a value, the macro result will be:

There is a minimum charge.

 

If it does not have a value, the macro result will be:

There is no minimum charge for this one

 

The macro result can itself also contain a macro:

{{Project.Meter.Min - Base TF?Project.Meter.Counter.Name" charges a minimum charge"}}

 

If the Project.Meter.Min - Base TF isn’t empty, the above macro might evaluate to:

Min Charge charges a minimum charge

 

Note: All macros begin with {{ and end with }}. Also note the use of ".

 

Note Type Macros

If there are multiple type Notes, you will need to pass the Note Type. Examples:

 

note type

 

Further Information

Basic Email Macros

Email Macros Syntax

Create a Default Email Template

Create an Email Template

Set up and Use Random Email Templates

Use Email Templates