Recent updates
-
Creating a Business Rule
Updated onArticleBusiness Rules are one of the critical components to building Apps in Onit. While Actions enable you to specify what should happen inside of your App (e.g., an email should be sent, a spreadsheet should be generated), Business Rules enable you to specify when your Action should fire.
For example, an App creator may have created an Action that adds a participant to a Record. A Business Rule could be used to specify exactly when this should happen. The App creator could have the Add Participant Action run when the Record is first created, by tying it to a Transaction Created Business Rule. Alternatively, the App creator could have the Action run when a phase change occurs by instead tying it to a Transaction Phase Change Business Rule. There are over a dozen different types of pre-defined Business Rules, each of which enable you to run an Action at a different time.
In many cases, you can also add a Condition to a Business Rule, which allows you to get even more specific when configuring when an Action should run. For example, you could run an Add Participant Action only if the Record in question had a price field value that was greater than $1,000.
Developer Tutorials and Materials App Builder Developer Tutorials Basics of Business Logic
-
Creating a Button to Execute an Action
Updated onArticleWhile Onit Apps are pre-configured with a few standard Buttons out-of-the-box, an App creator can also create their own custom Buttons. While there are different types of Buttons that you can create, in this tutorial we’ll explain how to create Action Buttons, which are helpful if your App’s users need to run an Action ad-hoc.
For example, you might want users to run a Generate Spreadsheet Action on a Record whenever they want. If so, you can create a Button that fires this Action.
Action Buttons can be configured to display in one of two places: on View Pages or on the App's Dashboard.
- View Page Action Buttons: When clicked, these Buttons usually run an Action on a single Record -- the one that is currently being viewed by the user.
- Dashboard Bulk Action Buttons: These Buttons work in bulk -- they run the same Action on many different Records at the same time. A user browses to an App’s Dashboard, selects all of the Records that they want to run the Action on, and then clicks the Button.
An Action Button can optionally accept a Condition that will affect if and when the Button displays. For example, you could create a Condition that only displays a Button to a certain type of user (e.g., only Managers).
Developer Tutorials and Materials App Builder Developer Tutorials Basics of Business Logic
-
Working with Fields Liquid Examples
Updated onArticleDetermine If a Field is Either Blank or Null
For a Text Field:
{% if matter_name == blank %}true{% endif %}
For a Date Field:
{% if date_field == blank %}true{% endif %}
Access the Display or Save Value of a Combo Field:
Display Value:
{{ atom | combo_display: 'combo_field_name' }}
Save Value:
{{ atom | combo_value: 'combo_field_name' }}
*This does not work with ListCombo Fields
Access the Display or Save Value of a MultiSelect Field:
Display Value:
{{ atom | combo_display: 'multiselect_field_name' }}
Save Value:
{{ atom | combo_value: 'multiselect_field_name' }}
*This Liquid will return an Array of values
MultiCurrency Values
Get international currency code:
{{ currency_field.currency }}
Get MultiCurrency Value:
{{ currency_field.amount }}
Get MultiCurrency Value in subunits (e.g., cents):
{{ currency_field.cents }}
List Lookup
{{ [field_from_atom] | list_lookup: '[List Name]', '[column name to match]', '[column name to output]' }}
Below we are finding the value of name field in the activity column in the T3 list and returning the corresponding html_instructions from the matching row.
{{ name | list_lookup: 'T3', 'activity', 'html_instructions' }}
List Lookup – Whole Atom
If an atom is part of a Transaction List Provider, you can populate a variable with all of its attributes. For example, let's say you have a TLP that lists your legal entities. In your Matters app, once the legal entity is set, you want to look up its address, phone number, main contact, and so on. Instead of doing 21 different list lookups, you can do one list_lookup_atom:
{% assign entity = legal_entity | list_lookup_atom: 'Legal Entities', 'name' %}
and then output:
{{ entity.address }}
{{ entity.country }}
{{ entity.main_billing_contact }}
... and so on.
Copy MultiCurrency Values
Suppose you have two apps, APP 1 and APP 2, and both apps are related (parent-child for example). You want to copy over a multi-currency field from APP 1 to APP 2 using an 'Update Related Transaction' action. Here is how we configure the params liquid property of the action:
p_mcf_app_2:{{mcf_app_1.amount}} {{mcf_app_1.currency}}
Note: mcf stand for Multi-Currency Field, and of course you need one multi-currency field in each app.
Update Attachment Field with a Document from a DocumentFolder Field
Suppose we have an App, that App has an attachment field and a DocumentFolder field. We want to trigger and action that will set/update the content of the attachment field to the first document in the DocumentFolder field. Here is how we do it:
- Create an Update Transaction action, and in the Params Liquid filed use this:
p_name_of_the_attachment_field: {{atom.documents[0]._id}}
- Now we can create a button or business rule so we can attach the above Update Transaction action
Import a Textarea Field into a Word Document Without Losing Line Breaks
When pulling data from a Textarea Field using a Generate Document Action Word will take the formatting out of the Textarea Field. This Liquid will look for line breaks and insert a split.
{% assign splits = '{ "key": "\r\n"}' | parse_json %} {% assign lines = textarea_field | split: splits.key%} {% for line in lines %} {{line }} {% endfor %}
Reference Materials Liquid Variables, Filters, Calculations, Tags, and Examples Resources
-
Date Calculations Liquid Examples
Updated onArticleDate Calculations
If you are using any date math in a UI Action (as opposed to a regular Action), you must first use the
to_date
filter. E.g.,{{ date_field | add_days: 3 }}
will produce an error;{{ date_field | to_date | add_days: 3}}
will work.Formatting Dates
27 Nov 2017:
{{ created_at | short }}
November 27, 2017:
{{ created at | long }}
27 Nov 2017 9:29AM:
{{ created_at | short_time }}
November 27, 2017 9:29AM:
{{ created_at | long_time }}
3 months ago:
{{ created_at | when }}
11/27/2017:
{{ created_at | date: '%m/%d/%Y' }}
Common Date Math:
Add Days: {{ date_field | add_days: 3 }} Subtract Days: {{ date_field | subtract_days: 3 }} To Date: {% assign now_date = now | to_date %} {{ now | to_date }} Subtract Dates (returns a number): {{ date1 | subtract_date: date2 }} Assign Current Date: {{ now | date: "%y/%m/%d" }} Assign Current DateTime: {{ now | date: '%Y-%m-%dT%T' }}
Useful Date Liquid Filters:
{{ add_years }} {{ subtract_years }} {{ add_months }} {{ subtract_months }} {{ add_business_days }} {{ subtract_business_days }}
Output the number of days that have elapsed between two DateTime Fields:
{% assign started_sec = phase_started | date: "%s"%} {% assign ended_sec = phase_ended | date: "%s"%} {% assign total_elapsed_seconds = ended_sec | minus: started_sec%} {% assign days_elapsed_int = total_elapsed_seconds | divided_by: 86400%} {% assign days_elapsed_mod = total_elapsed_seconds | modulo: 86400%} {% assign hours_elapsed_int = days_elapsed_mod | divided_by: 3600%} {% assign hours_elapsed_mod = days_elapsed_mod | modulo: 3600%} {% assign minutes_elapsed_int = hours_elapsed_mod | divided_by: 60%} {% assign minutes_elapsed_mod = hours_elapsed_mod | modulo: 60%} {{days_elapsed_int}} Days, {{hours_elapsed_int}} Hours, {{minutes_elapsed_int}} Minutes
*Where phase_started and phase_ended represent the custom DateTime Field names whose values should be used in the calculation.
Output the number of elapsed business days between two DateTime Fields:
{% assign start = phase_started | date: '%s' %} {% assign end = phase_ended | date: '%s' %} {% assign days = end | minus: start %} {% assign leftover = days | modulo: 86400 %} {% assign days = days | minus: leftover %} {% assign days = days | divided_by: 86400 %} {% assign first_day = phase_started | date: '%u' %} {% assign last_day = phase_ended | date: '%u' %} {% assign diff = first_day | minus: last_day %} {% if first_day > last_day %} {% assign days_to_subtract = 7 | minus: diff %} {% else %} {% assign days_to_subtract = diff | times: -1 %} {% endif %} {% assign days = days | minus: days_to_subtract | plus:1 | round %} {% assign weeks = days | divided_by: 7 %} {% assign business_days = weeks | times: 5 %} {% if last_day > first_day %} {% assign last_minus_days = last_day | minus: days_to_subtract %} {% if last_minus_days > 6 %} {% assign business_days = business_days | plus: days_to_subtract | minus: 1 %} {% else %} {% assign business_days = business_days | plus: days_to_subtract %} {% endif %} {% else %} {% if days_to_subtract != 0 %} {% assign days_greater= days_to_subtract | minus: last_day %} {% assign days_to_subtract = days_to_subtract | minus: days_greater %} {% assign business_days = business_days | plus: days_to_subtract %} {% endif %} {% endif %} {% if leftover > 0 %} {% assign business_days = business_days | plus: 1 %} {% endif %} {{business_days}}
*Where phase_started and phase_ended represent the custom DateTime Field names whose values should be used in the calculation.
Reference Materials Liquid Variables, Filters, Calculations, Tags, and Examples Resources
-
How to Create a Budget Template
Updated onArticleRecords on the Budget App can serve as templates for future budgets. To create a new Budget template, launch the Budget App and click the Is Template radio button.
End User Guides ELM End User Guides Budgeting
-
Creating Spot Rate Conversions
Updated onArticleSpot rate conversions need to be manually set up in BillingPoint. If they are not set up in BillingPoint, the Onit App Builder spot rate conversion Actions will not work.
To do this in BillingPoint:
- Log into the client in question’s BillingPoint instance.
End User Guides ELM End User Guides Budgeting
-
Overview of Budgets in Onit
Updated onArticleWhen it comes to storing budget and spend information, Onit is able to do so at either the overall-level (life of the matter), or monthly, quarterly, or yearly. Within any of these time ranges, Onit can optionally further break up the data by fees versus expenses or they can be grouped together.
For granular budgeting (life-of-matter, annual, quarter, etc.), there are a number of configuration tasks that you should usually complete. Some of the below are a few hard-fast rules, while others are general recommendations/FYIs that you should be aware of.
End User Guides ELM End User Guides Budgeting
-
Customizing the Timekeeper Rate Approval Workflow
Updated onArticleThe timekeeper approval workflow can easily be modified according to your business needs. The default Timekeeper Rates App approval workflow has four phases:
- New
- Pending
- Approved
- Rejected
All new Records will move immediately into the “Pending” phase. The Record will stay in the “Pending” phase until all approvals have been granted, then it will advance to the “Approved” phase. If the Record is rejected by an approver the Record will move to the “Rejected” phase until the vendor resubmits the Record in BillingPoint.
Custom phases may be added between the “Pending” and “Approved” phase. The “Approved”, and “Rejected” phases should not be modified as these tie into BillingPoint logic. Customizing a Timekeeper Rates workflow is the same as customizing any other workflow in Onit. Let’s breakdown how one custom solution was implemented.
This client chose to add two additional phases between “New” and “Approved”.
End User Guides ELM End User Guides Working with Invoices
-
Add a Status to a Matter
Updated onArticleParticipants on a record can keep up-to-date with activity on a matter via the Status App. You can add a status to any matter via the Add Status Button under More Actions on a Matter’s View Page.
End User Guides ELM End User Guides Working with Invoices
-
How to Request a Status Update from a Vendor
Updated onArticleYou can request a status update from vendors assigned to a matter via the Request Status Update from Vendors button under More Actions on a Matter’s View Page.
End User Guides ELM End User Guides Working with Invoices