#foreach


The #foreach data helper can list data directly from your matters:

  • Task List
  • Shared Documents
  • Accounts
  • Time Recording entries

It can be used within the below scenarios, using any combination of the statements provided.

Matter Tasks

All Tasks

Use the following statements to output a list of tasks on the matter which are visible to that stakeholder:

Statement

Output

{{#foreach matter.tasks}}

  • {{taskname}}

The name of the task

  • {{description}}

The Stakeholder description of the task

{{#foreach notes}}

  • {{createdby}}
  • {{#datetime createdon}}
  • {{content}}

{{#endforeach}}

Any Notes on the task, including:

  • The name of the User that generated the note
  • The date and time the note was added
  • The description of the note

{{#endforeach}}

Completed Tasks

Use the following statements to output a list of completed tasks on the matter which are visible to that stakeholder:

Statement

Output

{{#foreach matter.completedtasks}}

  • {{taskname}}

The name of the completed task

  • {{description}}

The Stakeholder description of the completed task

  • {{#datetime completedon}}

The date and time the task was completed on the matter

{{#foreach notes}}

  • {{createdby}}
  • {{#datetime createdon}}
  • {{content}}

{{#endforeach}}

Any Notes on the completed task, including:

  • The name of the User that generated the note
  • The date and time the note was added
  • The description of the note

{{#endforeach}}

Newly Completed Tasks

Use the following statements to output a list of newly completed tasks on the matter which are visible to that stakeholder:

Newly completely tasks are those that have been completed since the Stakeholder last received the 'Automatic Update' email template.

Statement

Output

{{#foreach matter.newcompletedtasks}}

  • {{taskname}}

The name of the newly completed task

  • {{description}}

The Stakeholder description of the newly completed task

  • {{#datetime completedon}}

The date and time the task was completed on the matter

{{#foreach notes}}

  • {{createdby}} on {{#datetime createdon}}
  • {{content}}

{{#endforeach}}

Any Notes on the newly completed task, including:

  • The name of the User that generated the note
  • The date and time the note was added
  • The description of the note

{{#endforeach}}

Outstanding Tasks

Use the following statements to output a list of outstanding tasks on the matter which are visible to that stakeholder:

Statement

Output

{{#foreach matter.incompletetasks}}

  • {{taskname}}

The name of the outstanding task

  • {{description}}

The Stakeholder description of the outstanding task

{{#foreach notes}}

  • {{createdby}} on {{#datetime createdon}}
  • {{content}}

{{#endforeach}}

Any Notes on the outstanding task, including:

  • The name of the User that generated the note
  • The date and time the note was added
  • The description of the note

{{#endforeach}}

Shared Documents

Use the following statements to output information on any documents that have been shared with the Stakeholder within their Portal:

This is great to use within your automatic Document Visibility email.

Statement

Output

{{#foreach documents}}

  • {{name}}

The name of the file shared with the Stakeholder

  • {{#datetime sharedon}}

The date and/or time the file was shared with the Stakeholder.

Configure the output using our #datetime data helper.

{{#endforeach}}

Matter Accounts

Receivables

Use the following statements to output details of the receivables on a matter:

This includes those that have been invoiced and those that are outstanding.

Statement

Output

{{#foreach matter.receivables}}

  • {{details}}

The receivables details

  • {{account.name}}

The account the receivables raised against

  • {{amount}}

The amount of the receivable excluding VAT

  • {{tax}}

The amount of any VAT applied to the receivable

  • {{total}}

The total amount of the receivable including VAT

{{#endforeach}}

Invoices

Use the following statements to output details of any invoices and standalone credit notes on a matter:

Statement

Output

{{#foreach matter.clientinvoices}}

  • {{#datetime createdon}}

The date the invoice was raised

  • {{#datetime duedate}}

The invoice due date

  • {{reference}}

The invoice reference

  • {{paid}}

The total amount paid

  • {{outstanding}}

The total amount outstanding

  • {{total}}

The total amount of the invoice including VAT but excluding any credit notes applied

{{#endforeach}}

Supplier Bills

Use the following statements to output details of any supplier bills on a matter:

Statement

Output

{{#foreach matter.supplierbills}}

  • {{#datetime createdon}}

The date the supplier bill was raised

  • {{#datetime duedate}}

The supplier bill due date

  • {{reference}}

The supplier bill reference

  • {{paid}}

The total amount paid

  • {{outstanding}}

The total amount outstanding

  • {{total}}

The total amount of the supplier bill including VAT but excluding any credit notes applied

{{#endforeach}}

Client Deposits

Use the following statements to output details of any client deposits on a matter:

Statement

Output

{{#foreach matter.client.deposits}}

  • {{amount}}

The total amount of the client deposit

  • {{#datetime date}}

The date of the deposit

{{#endforeach}}

Anticipated Deposits

Use the following statements to output details of any anticipated client deposits on a matter:

Statement

Output

{{#foreach matter.client.anticipated.deposits}}

  • {{amount}}

The total amount of the client deposit

  • {{#datetime date}}

The date of the deposit

{{#endforeach}}

Matter Ledger

Use the following statements to output details of the matters ledger:

Statement

Output

{{#foreach matter.ledger.transactions}}

  • {{details}}

The details given to the transaction

  • {{#datetime date}}

The date of the transaction

  • {{officeTax}}

The amount of VAT on the transaction

  • {{officeDebit}}

The amount debited from the Office account

  • {{officeCredit}}

The amount credited to the Office account

  • {{officeBalance}}

The resulting balance on the Office ledger

  • {{clientDebit}}

The amount debited from the Client account

  • {{clientCredit}}

The amount credited from the Client account

  • {{clientBalance}}

The resulting balance on the Client ledger

{{#endforeach}}

Time Recording

Use the following statements to output details of the matters time recording:

Statement

Output

{{#foreach matter.timerecords}}

  • {{#datetime date}}

The date of the recording

  • {{status}}

The recording's current status

  • {{feeearner}}

The assigned Fee Earner

  • {{type}}

The type of time recording

  • {{notes}}

The details given to the time recording

  • {{rate}}

The rate given to the time recording

  • {{#calc 6* units}} minutes ({{units}} units)

The total amount of time recorded (the total amount of units recorded)

  • {{amount}}

The total amount of the time recording

{{#endforeach}}

<< Previous      Next >>
Powered by HelpDocs (opens in a new tab)