Computed field in Contacts: put data into fields only once, get all the combinations you need automatically

Your suggestions for future versions of EssentialPIM

Moderators: TerryRogers, Max

Post Reply
Keldi
Guru
Posts: 377
Joined: Thu Aug 23, 2012 11:42 am
Has thanked: 26 times
Been thanked: 92 times

Computed field in Contacts: put data into fields only once, get all the combinations you need automatically

Post by Keldi »

I'd like to have a new type of field in the contacts module.
Computed field - a virtual field that contains data from other fields for quick coping to outside of EPIM / extra 'combined' columns / simple calculations.

epim_contacts_computed_field1.png
epim_contacts_computed_field1.png (5.23 KiB) Viewed 1216 times
epim_contacts_computed_field2.png
epim_contacts_computed_field2.png (16.07 KiB) Viewed 1216 times


In the examples below I'm going to use something similar to foobar2000 syntax for custom columns. I think it's simple enough to understand and at the same time quite a powerful way of configuring virtual fields. But the syntax itself isn't important, here it's just a way to demonstrate what I'm talking about.

Let's assume we have a contact with fields + data:

First Name: John
Last Name: Smith
Birthday: 30.01.1956


then in the Computed Field:

%First Name% will be replaced with John.

%First Name% %Last Name% will be replaced with John Smith.

%Last Name%, %First Name% will be replaced with Smith, John.

[%Last Name%, ]%First Name% will be replaced with Smith, John. But if the field Last Name is empty, it'll return just John without the comma and space before it (everything inside the square brackets is returned only if the variable there isn't empty).

'['%First Name%']' will return [John] (special characters are escaped by closing them in ').

First Name: %First Name
Last Name: %Last Name%

has a new line in it, so the result will be:
First Name: John
Last Name: Smith
.

$cut(%First Name%,1). %Last Name% - $cut(str,len) returns first len characters from the left of the string str, so the result here is J. Smith.

$upper(%First Name% %Last Name%) will be replaced with JOHN SMITH.

$formatdate($sub($date(today),%Birtday%),YYYY years, MM days, DD days) - subtracts from today's date the date of birthday and returns the result (age) in the format years + months + days: 65 years 4 months 3 days.

$formatdate($sub($date(today),%Birtday%),YYYY years, DD days) - subtracts from today's date the date of birthday and returns the result in the format years + days: 65 years 123 days.

$if(conditon,then) - I just leave it here too, this one has a lot of power.

 
That's just some examples. The magic of computed fields is that once you have the data in your contact, you can configure how you want this data to be additionally displayed (or copied). The computed field can be useful for:

1. Quick copy/paste of predefined template with data from fields to some outside messengers/email clients/...
2. Combining columns for quick sorting by several parameters.
3. CSV-export with data already arranged and pre-formated the way you need it, thus speeding things up and avoiding extra tampering in spreedsheets and such.
4. Avoiding duplicating data in several fields of the contact, which can lead to mistakes during editing (when only some fields end up with updated data).
5. If it gets some pre-build variables (i.e. today's date) and some simple maths functions, some nice additional colums can be configured, like 'Age', 'Days left to birthday', 'Time gone since the date in a custom Date field' and so on.

I'm aware that the mail module has some 'Insert Field' functionality for newsletters/envelopes. But I don't use this module. And I think having this in the Contacts module is more universal anyway (a lot of different things people store there, not always only contacts).

I hope other users are interested in having some sort of this functionality in EPIM and will vote for it being implemented. But if not... well, at least I put it out there. :D

Regards
admin
Site Admin
Posts: 15572
Joined: Thu Nov 25, 2004 3:12 am
Has thanked: 1406 times
Been thanked: 977 times

Re: Computed field in Contacts: put data into fields only once, get all the combinations you need automatically

Post by admin »

That's a very interesting suggestion, Keldi! Thanks for taking your time to explain it in such details. Let's see if other users find it useful for their needs and if so, our implementation will follow.
Android version of EssentialPIM. Keep all your data in sync!
Bareges25
Novice
Posts: 16
Joined: Mon Jan 09, 2017 11:37 pm
Been thanked: 3 times

Re: Computed field in Contacts: put data into fields only once, get all the combinations you need automatically

Post by Bareges25 »

Cracking idea

Regards
CDWOS
Texter
Guru
Posts: 461
Joined: Fri Jan 01, 2010 9:24 pm
Location: Germany
Has thanked: 20 times
Been thanked: 165 times

Re: Computed field in Contacts: put data into fields only once, get all the combinations you need automatically

Post by Texter »

Great Idea.

I've got another use:
in contacts I've to enter the Zip Code / City automaticly.
So there could be a link from Zip-Code to enter the City automaticly.
Not the other way, my City has ~12 different Zip Codes ;)
Epim-User since 12/2007 - changed to pro later - never change a running system - now Epim Lifetime.
Running latest* Epim Pro Portable on a Lenovo T14p with Win 10 64bit.
*including RC`s
spoken languages: German / English
duarte.framos
Novice
Posts: 34
Joined: Wed Jan 08, 2020 2:04 pm
Has thanked: 24 times
Been thanked: 3 times

Re: Computed field in Contacts: put data into fields only once, get all the combinations you need automatically

Post by duarte.framos »

This is is a great idea. Computed fields could be helpful across all modules, including tasks.

This may not be trivial to implement at all, but would basically turn EPIM into powerful spreadsheet of sorts. Especially if it included basic math formulas, Excel styles
User avatar
ecsaltz
Guru
Posts: 644
Joined: Fri Jul 18, 2008 12:14 pm
Location: Durham, North Carolina, USA
Has thanked: 30 times
Been thanked: 76 times

Re: Computed field in Contacts: put data into fields only once, get all the combinations you need automatically

Post by ecsaltz »

+1

In the past, I would write a software program to merge exported fields from WinEPIM for use as input with other programs. This new suggestion is great for contacts, but I could see it work for tasks, perhaps others.

As Captain Jean Luc Picard of the TV series "Star Trek: The Next Generation" would say: "Make it so!"
PC Desktop: Window 11 Pro, 34 inch 4K monitor.
Cell phone: Verizon Wireless Samsung Galaxy S22 Ultra, Android 12 - linked with Garmin Fenix 6 Pro wrist watch and Fitbit Sense wrist watch.
Post Reply