Script to ADD Contact

62 views
Skip to first unread message

Eoprava sk

unread,
Feb 19, 2026, 7:52:59 AMFeb 19
to mementodatabase
Hello. 

I seek for an advice, I´d like to ADD customer contact to my Android Phone. 
I already set up , that when the customer is new one, i just writte it once and it will create customer in customers library. 

Now i ´d like to Add the customer to my contacts, so I know who´s calling me. 

Setup:
Android 14, Google Phone (Google Contacts) APP
Contact in library:
Name (Text field)
Phone (Phone field)
Email: (Mail field) - don´t need to store the mail , just in case for future. 

Anyone have an idea? 

Sending my script to ADD to another library as an example

let lbn = libByName('Zakaznici');
let cust = lbn.entries();
// Array of all phone numbers
let phon = cust.map(a => a.field('Mobil'));

let e = entry();
let ph = e.field('Mobil');

// Create a record if the phone number is not in Customers
if (!phon.some(a => a === ph)) {
    let obj = {};
    let arr = ["Mobil", "Meno,firma", "Email", "Firma", "Názov firmy", "Adresa", "PSČ Mesto", "IČO", "DIČ", "IČ DPH"];
    for (let abc of arr) {
        obj[abc] = e.field(abc);
    }
    lbn.create(obj);
    message('Zákazník pridaný ' + obj['Meno,firma']);
}

Mmm

unread,
Feb 20, 2026, 1:52:33 PMFeb 20
to mementodatabase
Подключите встроенную js-библиотеку contacts.js.

Код скрипта и допустимые параметры описаны в комментариях библиотеки:

Пример использования (Андроид 15).
Новый контакт создаётся скриптом действие в карточке записи.

Шаблон в каталоге шаблонов:
четверг, 19 февраля 2026 г. в 15:52:59 UTC+3, eop...@gmail.com:
ic_1.png
Reply all
Reply to author
Forward
0 new messages