Creating and Updating Records from a List

by Christina Moore Updated Jun 09, 2020

You can leverage data in an Excel spreadsheet to create new (and update) transactions in Onit. This can be a huge time-saver when it comes to importing data from Excel or third-party systems.

For example, let’s say that you have a spreadsheet containing all your legal matters along with their data. You could sync this spreadsheet with Onit, so that one new Onit transaction gets created for each row in the spreadsheet. Not only would Onit create the transactions, but each one’s Fields values would be populated as well.

Despite how powerful this tool is, it’s all pretty simple to set up. We’ll explain how it works in this tutorial.

Note: In this tutorial, the words List and spreadsheet are used interchangeably.

Before We Start ...

This tutorial will assume you understand the following concepts:

Let's Get Started!

1. Building a List

You’ll need to follow the basic requirements outlined in the Formatting, Importing, and Updating a List tutorial.

As described in the tutorial, your List must include columns for each Field you want to push data into. Since we want to create new transactions from this List, and every transaction requires a value for its name and requester_email Fields, we must include these as column in our List, as seen in Columns B and C below.

2. Browse to List

After importing your List, (as covered in Formatting, Importing, and Updating a List), select List from the left-hand pane of the Administration page.

Select the List that you want to create transactions from.

3. Synchronize Your List

At the top of the list, select Synchronize List.

In the dialog that appears, select the App that you want this data synchronized into.

The Notification Email will be the email address that receives a notification when the List is successfully synced.

The Prevent Notifications property refers to the notifications, configured by default in Onit apps, that notify requesters whenever a transaction is created. This property can be used to override this Send Notification Action. If this property is not selected, the requesters identified in your List’s requester_email column will be sent a notification for each transaction that is created under their name. We’ll leave this property selected.

Select Synchronize.

Tip: UI Actions can also set the content of a MultiSelect Field. You can use a comma-separated list of values, or if your value has a comma in it we also support JSON: ["Acme, Corp.","Onit, Inc."]. 

To generate JSON for your MultiSelect Field use the following Liquid guide:

{% assign list  = "Coyote|Acme, Corp.|Roadrunner" %}
{% assign list_split = list | split: "|" %} 
{% assign json = list_split | to_json %} 

This Liquid splits the original list on the delimiter (in this case a pipe, '|'), then converts the split list to JSON using the to_json Liquid filter. Plug in your pipe delineated list in the list variable, and the Liquid will do the rest.

View Your New Transactions

Hop over to the Dashboard of the app that your List was synchronized with. From here, view your new transactions, and confirm that the appropriate Fields are populated with the correct data.

In this example, we synced five new transactions to an app:

Updating Transactions by Syncing

Note that you can also use this same synchronization process to update transactions, even if those transactions weren’t originally created by syncing.

Let’s say that you have a whole bunch of existing transactions in Onit whose Fields values need to be changed or populated for the first time (i.e., they are currently blank). If you had this data in an Excel spreadsheet, you could use it to sync the Field values into the existing transactions, which would be a lot faster than manually typing in the data.

As with any other List update in Onit, using a Primary Key will allow your List to cross-reference a Field’s value and update the correct transaction. You can learn more about how to use a Primary Key in our Formatting, Importing, and Updating a List tutorial. Note that your Primary Key will need to be an existing Field in the transactions you want updated and one whose value is unique for each transaction. For the spreadsheet used as an example above, we might use the invoice_number Field as a Primary Key since we'd expect its value to always be unique.

Note: If you're only updating transactions (and not creating any new transactions), you will not need to include the columns for the name and requester_email Fields in your spreadsheet.

Previous Article Formatting, Importing and Updating a List
Next Article Generating a Spreadsheet

© 2020 Onit, Inc. contains proprietary and confidential information owned by Onit, Inc. that is subject to copyright. Onit presents it exclusively to you for your sole use in conjunction with using Onit products. No portion of the materials contained herein may be used for any other purpose. No portion of the materials contained herein may be shared with third parties or reproduced in any form.