Hi Glen,
The script seems to be working. I just had to do a ‘recalculate formulas’ on the records.
Cheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricks
Incomplete synchronization with Cloud+ persisted in ver.1.1, but after importing into a new file and rebuilding it, synchronization became possible.
The synchronization date and time for the encrypted database is not displayed on the iPhone.
Now easier to use with universal layout
It’s convenient to be able to run scripts with buttons. Until now, I’d been using radio buttons as a substitute.
The buttons in the universal layout cannot be deleted or edited.
You gave me the script to add data from the previous record to the current record and I have it installed in my form, and I changed the reference to the previous record I think, but it isn’t working.
Can somebody solve this for me looking at my tfarc file?
I want todays data added to the running total of the previous record so the total gets bigger every record added.
Attachments:
You must be
logged in to view attached files.
If you export your records as CVS, there’s an option to export all media as well. That should do the trick.
Otherwise, you could export them using a script.
Cheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricks
I’m using Cloud+, but synchronization is sometimes incomplete.
Records are created, but data is sometimes not copied.
Clicking a field triggers synchronization.
Changes made via script are sometimes not synchronized.
After synchronization, the form icon sometimes reverts to the default.
Linked records may not appear in the link field.
The link itself is working.
Sometimes the record does not switch to the newly created record. (Since ver 1.0.15 or earlier)
Even after modifying the data, the list view does not visually sort. (Since ver 1.0.15 or earlier)
I’m not sure if this is the right place to be asking a subscription question but my guess is there will be a number of you have had the same question.
I have just upgraded from 5 to Pro. With 5 I was able to have Taps 5 installed on both my wife’s machine and my own using my registration number.
Now, however, my license has come through the App Store and is thus tied to my Apple ID and my wife’s machine is tied to her Apple ID.
Does this mean that now I will need to subscribe to two separate licenses tied to, our separate IDs?
Please understand this is absolutely not a moan. If I need to I’m more than happy to take another license ……………… but if I don’t I’ll be happier still!
DavidMac
Hi Michael,
If your data is in a form, you can use saved searches and filter for your condition. This way, only the relevant records are shown. When you look at them in multi-column list view, you can get your total costs.
Sometimes, I write scripts for reporting and display the result in an external browser.
Cheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricks
Grüezi,
Thanks for the code snippet, I’ll try it out later, including your ScriptHandler. By the way, while we’re on the topic of scripts, there might be a translation error in the German version. In the script overview, there’s a section with the little gear icon… it says “move to document,” but there is no “document” in the German overview. I think it should say “favorites,” and under “favorites” it should then say “switch to Formular.” I think the translation isn’t quite correct here.
Nice Week
Steve
You could try with following code snippet. Just add this at the beginning of your script. It adds the fetchRecordsWithMatch() function to the form object and presumably does a similar (or better?) thing than fetchRecordsForSearchTerm():
// form.fetchRecordsWithMatch
// Returns all records where the specified field matches the given value.
CDForm.prototype.fetchRecordsWithMatch = function(field_id, value){
return this.fetchRecords().filter(x => x.getFieldValue(field_id) == value);
}
And then instead of var auswahlRecoredsMonatsuersicht = formularMonatsuebersicht.fetchRecordsForSearchTerm('2026', feldJahrID); use var auswahlRecoredsMonatsuersicht = formularMonatsuebersicht.fetchRecordsWithMatch(feldJahrID, '2026');
This will return a record where all records are an extract match. This is what I have in my TF API Extensions script.
Viel Spass!
-
This reply was modified 8 months, 4 weeks ago by
Daniel Leu.
Cheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricks
Hi everyone,
Sorry to follow up again here,
I’m trying to load a dataset that I retrieve using fetchRecordsForSearchTerm('2026', feldJahrID). Unfortunately, there doesn’t seem to be any filtering happening at all. No matter what I enter as the search string, I almost always get nearly all records back.
If I search for “1”, I get 4 records. With “12” or “123”, I get 2 records. If I use “2”, I also get 4 records. Searching for “202” returns 4 records, and with “203” I get 3 records.
Either I completely misunderstand how the function works—in which case I apologize, because then, as usual, the problem is sitting between the keyboard and the chair—or something is definitely not working correctly here.
Thanks in advance for any information.
Steve
I’ll put the Script here because the Database has 12 MB so I can not upload ist
function Erstelle_Aktuellen_Monat() {
// Aktuelles Datum ermitteln
var aktuellesDatum = new Date();
var aktuellesDatumTag = aktuellesDatum.getDate();
var aktuellesDatumMonat = aktuellesDatum.getMonth() + 1;
var aktuellesDatumJahr = aktuellesDatum.getFullYear().toString();
// Formular Monatsübersicht mit benötigten Feldern
const formularMonatsuebersichtID = 'frm-e1192cd5b1724314b84fa584a02cca51';
const feldJahrID = 'fld-4c4ca5ba0da744e385e552ab5601fee0';
const feldMonatID = 'fld-9ccdf4162fed4721adaea441d9ff2d43';
const feldzugehörigeHausidID = 'fld-6841ad10151b477c86de0396fd186d75';
// Unterformular Zahlungseingänge mit benötigten Feldern
const formularZahlungseingaenge_id = 'fld-6fc140552dbc4a32a1dc078f7268d6e0';
const feldMieter_id = 'fld-ca6166213bf94662a7a7e04eff78b0d5';
const feldWohnung_id = 'fld-330fd8f304094d64bb99ddbfa4f9af8b';
const feldErwartete_einzahlung_id = 'fld-5f60efaf3c6043f2b008a65de6fd47c6';
// Formular Mietvertrag
const formularMietvertrag = 'frm-556cccd18f174e20982227e870784b87';
const feldMietvertragMieterID = 'fld-f9505864e6c048079fee1f640d13ba23'; // formatierter Name des Mieters
const feldMievertragWohnungID = 'fld-6779828c393c46dfb1e6d547b4c75f8d'; // Formatierte Whung (Haus + Wohnungsnummer)
const feldMietvertragDatumBeginnDesMietverhältnissesID = 'fld-7a5d9c2d2dd140fd85ebb7c4e7996fff'; // Ab wann gilt der Mievertrag
const feldMietvertragDatumEndeDesMietverhältnissesID = 'fld-af2bf0064540430d8c070d138a9a3ba3'; // Gilt dieser Vertrag noch
const feldMietvertragWarmmieteID = 'fld-1562739d1b1144c7ad250a0e7b379080'; // Das müsste auf dem Kontoauszug erscheinen
const feldMietvertragNebenkonstenSummeID = 'fld-3e8a8d04ce1944fb8eac5db9ede21391'; // Nebenkosten die mit gezahlt wurden (zur Gewinn berechnung benötigt)
// Weitere Variablen zum verarbeiten
var datensatzErstellt = 0;
// Monatsübersicht öffnen
console.log("Hole das Formular Monatsübersicht");
var formularMonatsuebersicht = document.getFormWithId(formularMonatsuebersichtID);
// Alle Datensätze holen, welche dem aktuellen Jahr entsprechen
console.log("Lese die Datensätze, für das Jahr: " + aktuellesDatumJahr);
var auswahlRecoredsMonatsuersicht = formularMonatsuebersicht.fetchRecordsForSearchTerm('2026', feldJahrID);
// Kontrollieren ob es Datensätze gibt
console.log("Kontrollieren ob es Datensätze gibt");
if (auswahlRecoredsMonatsuersicht.length == 0) {
// Es liegen keine Datensätze für das Jahr vor
console.log(auswahlRecoredsMonatsuersicht.length + " Datensätze gefunden");
// Da keine Datensätze für das Jahr vorliegen, kann für das aktuelle Haus ein Datensatz ertellt werden
} else {
// Es liegen Datensätze für das Jahr vor
console.log(auswahlRecoredsMonatsuersicht.length + " Datensätze gefunden");
// jetzt kontrollieren, ob diese auch für das aktuelle Haus sind
console.log("Kontrollieren ob einer für das ausgewählte Haus ist");
for (var index = 0, count = auswahlRecoredsMonatsuersicht.length; index < count; index++){
if (auswahlRecoredsMonatsuersicht[index].getFieldValue(feldzugehörigeHausidID) == record.getFieldValue(feldzugehörigeHausidID)) {
// Für das Haus gibt es bereits einträge
console.log("Einen Eintrag gefunden: " + auswahlRecoredsMonatsuersicht[index].getFieldValue(feldJahrID));
datensatzErstellt = 0;
} else {
// Für das Haus geibt es keine Einträge
console.log("Haus nicht gefunden");
// Neuen Datensatz erstellenb
datensatzErstellt = 1;
}
}
}
// document.saveAllChangesAndRefresh();
}
Hi Fernando,
I think that might be an iOS 26 issue. Script ordering is in both Tap Forms 5 and Tap Forms Pro on iOS, but for some reason it’s not working for me in either version. I’m on iOS 26.2.
I’ll take a look into it in Tap Forms Pro to figure out why it’s not working.
Thanks for bringing this to my attention.
Brendan
Hello Brendan,
I am writing to you again about the issue of script ordering in Tap Forms. I have many, with all kinds of reports, and in Tap Forms 5 with my iPhone I have no problem ordering them.
But it’s a feature you haven’t introduced in the new Pro. And it is very necessary for me. I guess I won’t be the only one this happens to.
I don’t have a Mac, which is very expensive in my country, so I can’t do it from my computer.
For this reason alone I continue using Tap Forms 5, although I want to switch to the Pro, but not having this utility that I use so much is making me delay it.
For all of these, I would greatly appreciate it if you included this issue in an upcoming Pro update.
Thank you very much and greetings.
Hi Patrick,
I’ve been using a helper script for a year or two so I can use fractions in my woodworking forms. Your post finally motivated me to bundle everything together in an example form and document how to use it.
Here’s the link: https://lab.danielleu.com/tapformspro/tips-tricks/index.html?p=Using-fractions
Hope this helps!
Cheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricks
var copyRecords = document.getFormNamed('Form 1').fetchRecords();
Check the API docs for Tap Forms Pro:
https://www.tapforms.com/help-mac/pro/en/topic/javascript-api
Hello everyone,
sorry I’m giving up. What I’m trying to do is simple. I have a form, wich is not linked, and I want to get the records to do searches in it.
According to everything I found this is done Very easy:
var copyRecords = document.getFormNames(‘form1’).getRecords();
when I try this, get an Error
TypeError: copyDummy.getRecords is not a function. (In 'copyDummy.getRecords()', 'copyDummy.getRecords' is undefined), line:(null)
my next try was to separate it:
var copyForm = document.getFormNamed(‘form1’);
var copyRecords = copyForm.getRecords();
same Error
going through the javascript doku on the support page I found
var copyRecords = document.getFormWithId(form1_id);
but I can not find a possibility to loop the records.
I think I’m thinking something wrong here but I do not get what.
Thanks for all hints