Data tags and custom fields: what's the difference, and how do I use them?

From Planfix
Jump to: navigation, search

Data tags and Custom fields have similar functionalities, so you may wonder what the difference is between the two, or when you should use one versus the other.


Basic differences

There are two main differences between data tags and custom fields:

1. A data tag can contain a set of fields that are different types. This lets you use data tags to add complex types of data. For example, one line of a data tag can contain payment date, the payment total, and payment description. These are three different types of fields that are brought together in one unified data point called "Payment."


2. Any number of data tags can be added to a task. This lets you use data tags to track cumulative data; in this way, data tags give you more options for tracking your data than custom fields (see the examples in the next section).


How do I use them?

Custom fields are best used for values that appear in an object (task, contact, etc.) one time and do not accumulate over time.

Examples of using custom fields

  • Delivery address for an order task;
  • A driver's full name on a waybill;
  • The budget allocated for a task, in hours


Data tags are usually used where you need cumulative tracking, or in cases when you need to attach several blocks with data of the same type to a task. Examples of using data tags:

  • Order lines in an order task (1 line = 1 data tag entry)
  • Route stops on a waybill
  • Actual time spent on a task, in hours (1 data tag entry per period of time spent)


Seeing the differences in an example

Imagine that you need to track expenses across tasks. You can calculate this in two different ways:

  • Adding an "Expenses" field to a task
  • Adding an "Expenses" data tag to a task


Despite seeming similar, using a data tag in this case is significantly more useful. By using an "Expenses" data tag in the task, you automatically track expenses while working on the task. Moreover, if you want to track cumulative values, all you have to do is add another "Expenses" data tag line. It's easy to find errors, should they arise, because you can see all the "Expenses" values that have been added over time, and when they were added.


If you add a custom "Expenses" field to the task and want it to be cumulative, you have to replace the value in the field with the new cumulative value every time there are new expenses to add. Besides the fact that that's inconvenient from a purely technical perspective, there's a nonzero probability that someone is going to make a mistake when calculating or editing the data. It would be very difficult to identify such an error.


Shared usage

One example of shared usage of custom fields and data tags is calculating planned and actual expenses on a task:

  • Planned expenses (or a budget) can be entered as a custom field, since it's a precise number that is agreed upon and entered once.
  • It makes more sense to enter actual expenses as a data tag, since there can be several expenses over the entire lifecycle of the task, and they're generally not entered all at once.


Reports let you create one table that displays the budget from a custom field and expenses from data tags, along with any desired calculations.


Go To