Advanced LiveDataset

Link datasets together to build online systems.

LiveDataset

Ensure Uniqueness within a Column

When you are organizing data you will often need to reference a specific entry using a unique name or number.

Within your department you could be sure that every project has different names and you can use “Project Name” as a unique identifier. E.g. you can use “Project Name” to lookup the project manager.

This will only work if the project name is unique. If there are multiple projects with the same name, LiveDataset cannot know which project is the one you want.

There are two ways to address this:

1. Generate Meaningless Sequence Numbers

This approach is useful when you have very large numbers of entries or there is no obvious natural way to name them e.g. Invoices.

  • Add a system column of type “Sequence Number” (see System Columns).
  • Use this number as a unique reference number for each project.

2. Ensure Meaningful Names are Unique

This approach allows you to keep using meaningful names.

  • Set a column to be unique - this prevents duplicates in the same column.

Set a Column to be Unique

Setting a column to be unique is needed to merge data into an existing dataset.

To make this change you will need account admin access to use design mode:

  1. Press MORE then Modify dataset
  2. Select the tab
  3. Next to the column you want to change, click on Edit
  4. Under “Data Entry”, click the following option so that it is checked.
    Must be unique
  5. Press to save your changes.

TIP Normally Required should also be set.

 

 

Now when anyone tries to save another entry with the same name, they will be warned “Unique Key Conflict Detected” (i.e. there is a duplicate)…

… and be asked to either:

  • “Discard my change” – this will remove the new entry; or
  • “View conflict” – to see duplicate entries

 

Choosing “View conflict” shows you the duplicate entries side-by-side so you can make the necessary changes to resolve any duplicates and .

 

Set Multiple Columns to be Unique

You can set multiple columns to be unique. This will allow duplicates in the same column, but the combinations must be unique.

For example, you could have a dataset with weekly employee timesheets like this.

Week* Employee* Hours
1 Joe Bloggs 25
1 Jane Smith 40
2 Joe Bloggs 30
2 Jane Smith 20

Setting “Must be Unique” for both “Week” and “Employee” columns, means an employee cannot enter a second timesheet for the same week.