Search Results for 'script'
-
Search Results
-
I’ve been watching your blog for any news, but I realize you’ve probably been very busy working on TF5. Are there any updates on Apple Intelligence, App Intents, Shortcuts, or AppleScript that we might look forward to, in the near future? For example, are there any updates on us being able to use Tap Forms like we currently use AirTable is its ilk online? I would really prefer a local solution.
I can see from previous posts there isn’t an on-form-load trigger event in which I could attach a script to do a series of things or update calculated fields when I open my datbase, but I could make a script which I manually trigger or I manually click refresh records.
I wondered about an idea that might achieve the same thing but allow me a level of automation/scheduling via a backdoor sort of route.
I sync my database with CouchDb (hosted on my NAS), I wonder if I could issue a command to make a tiny edit in the TapForms CouchDb to my database, which would then cascade a refresh to TapForms, and this would then force the calculated fields or scripts to execute.
the Apple Script code to do something to couchdb would be based on:
— Define CouchDB URL and credentials
set couchdbURL to “http://192.168.1.240:5984/db-1a619b6d486c466c9fc32a1b4a494f00” — Replace with your CouchDB URL
set couchdbUser to “admin” — Replace with your CouchDB username
set couchdbPassword to “removed” — Replace with your CouchDB password— Create the shell command for the curl request
set curlCommand to “curl -u ” & couchdbUser & “:” & couchdbPassword & ” ” & couchdbURL— Run the shell command
do shell script curlCommand— Optional: Notify completion
display notification “CouchDB refresh request sent” with title “CouchDB Refresh”what I’m not sure, having looked in CouchDb is what or where i’d start to make a tiny tweak. i.e. i could create a dummy field in TapForms I don’t need, but I changed via AppleScript to cascade a refresh.
Thoughts anyone????
Cheers
Topic: Check List via a Table?
I’m wanting to create a table as a list of jobs to do, and have table fields that include things like ‘Task’ ‘Priority’, ‘Done’. (where Done is a check-mark).
I’d wondered if I could add a script field into the table that somehow runs whenever the check-mark is checked, and it’ll run a script like something below, to delete the row that I’ve just added the check-mark against, sort of acting like a to-do list that deletes completed tasks.
the below runs but it doesn’t work, and I wonder if I’m missing anything obvious.
function deleteCheckedRows() {
var tableFieldID = ‘fld-e6d2b5eaf2fb4e78b708ff36d05f31a5’;
var checkmarkFieldID = ‘fld-475a8bbcba634befbca61e39a61fef8c’;// Get the rows in the table field
var tableRows = record.getFieldValue(tableFieldID);// Array to hold the rows that should remain
var rowsToKeep = [];// Loop through each row in the table field
for (var i = 0; i < tableRows.length; i++) {
var row = tableRows;// Check if the checkmark field is selected (true)
if (!row.getFieldValue(checkmarkFieldID)) {
// If not selected, keep this row
rowsToKeep.push(row);
}
}// Set the filtered rows back to the table field
record.setFieldValue(tableFieldID, rowsToKeep);// Save changes
document.saveAllChanges();// Optional: Provide feedback
Utils.alertWithMessage(“Checked rows deleted”, “All checked rows have been deleted.”, “info”);
}// Run the script
deleteCheckedRows();