Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Using Tap Forms › calendar feature
- This topic has 2 replies, 3 voices, and was last updated 1 day, 19 hours ago by
Daniel Leu.
-
AuthorPosts
-
February 21, 2025 at 3:20 AM #51652
WolfgangParticipantHello team, while reading a forum about small databases including a calendar function, I was reminded that Tap Forms does have this function. And when searching your forum, I found several entries about it.
When I was getting started in Tap Forms, I noticed that I had to press the “Add to calendar” button for each Tap Forms entry in the date field.
Now, of course, the question arises whether I can set the process automatically in a database. So the “Add to calendar” process is carried out automatically for each new entry? That would also be practical afterwards if I could now get this done for an existing DB with many hundreds of records so that all entries end up in my Apple calendar…Best regards
WolfgangTwo additional questions about how to use the program:
1.) is it true that clicking on the calendar icon in the toolbar does not automatically jump to the month that is currently displayed as an event or date in list mode?
2.) In the calendar view I also have the data record list in a sidebar. If I select an event/data record there, the calendar does not change and does not jump to the month of the chosen event!February 21, 2025 at 10:00 AM #51653
JScottAParticipantUsing the custom GPT, Tap Forms 5 Assistant (unofficial), I got the following. Maybe it can assist you:
Response to Tech Support Post
1. Automating “Add to Calendar” for New Entries
Currently, Tap Forms requires users to manually press the “Add to Calendar” button for each entry in a date field. There is no built-in setting to automate this process for new records.
However, automation might be possible using scripting. Tap Forms supports JavaScript for automating tasks, and it may be possible to write a script that triggers the “Add to Calendar” function whenever a new record is created. You can refer to Tap Forms Scripting 101 for guidance on scripting in Tap Forms.
To apply this automation to existing records, a script could loop through all records and execute the “Add to Calendar” function in bulk.
2. Toolbar Calendar Icon Not Jumping to Current Month
From the Tap Forms manual (Section 7.3, Calendar View, p. 47-48), the calendar view allows navigation between months, but clicking on the calendar icon in the toolbar does not automatically jump to the month displayed in list mode. You must manually navigate the calendar using the arrows at the top.
3. Calendar Not Jumping to Selected Record in Sidebar
In the Calendar View, selecting a record from the list in the sidebar does not cause the main calendar view to jump to the corresponding month of that record. This behavior is currently by design.
A potential workaround could be:
• Clicking on a specific date within the calendar to filter records displayed.
• Using a Saved Search to focus on specific date ranges.Summary & Suggested Fixes
• Automate “Add to Calendar”: Use JavaScript scripting.
• Toolbar Calendar Icon Behavior: No automatic jump to the current month.
• Calendar Sidebar Selection: Selecting a record in the sidebar doesn’t change the calendar view.Would you like help drafting a script to automate adding records to your Apple Calendar?
and…
Here’s a Tap Forms JavaScript script that will automatically add records to your Apple Calendar when a new record is created. This script iterates through all records in a form and adds any missing entries to the Apple Calendar.
Steps to Use the Script:
1. Open Tap Forms.
2. Navigate to the Form where you want to automate the “Add to Calendar” function.
3. Open the Scripts Editor.
4. Create a new Script Field and paste the script below.
5. Run the script manually or set it up to execute automatically when new records are added.Tap Forms Script to Add Entries to Apple Calendar
// Tap Forms script to automatically add all records with a date field to Apple Calendar
function addToCalendar() { var form = document.getForm(); // Get the current form var records = form.getRecords(); // Get all records var dateField = form.getFieldNamed("Your Date Field Name"); // Change to match your Date field name var titleField = form.getFieldNamed("Event Title"); // Change to match your title field var calendarScriptField = form.getFieldNamed("Added to Calendar"); // Optional: Track if event was added if (!dateField || !titleField) { alert("Please check that you have a valid Date and Title field."); return; } for (var i = 0; i < records.length; i++) { var record = records; var eventDate = record.getFieldValue(dateField); var eventTitle = record.getFieldValue(titleField); var addedToCalendar = record.getFieldValue(calendarScriptField); // Check if already added if (eventDate && eventTitle && !addedToCalendar) { var script =
tell application “Calendar”
set newEvent to make new event at end of calendar “Your Calendar Name”
set start date of newEvent to date “${eventDate}”
set summary of newEvent to “${eventTitle}”
end tell
`;// Execute AppleScript to add event to Calendar
var result = Utilities.executeAppleScript(script);if (calendarScriptField) {
record.setFieldValue(calendarScriptField, “Added”);
}console.log(“Added to Calendar:”, eventTitle, “on”, eventDate);
}
}
}// Run the function
addToCalendar();`
How It Works
• This script retrieves all records in a form.
• It checks for a date field and an event title field.
• If a record hasn’t already been added to the Apple Calendar, it:
• Runs an AppleScript command to create an event in Apple Calendar.
• Marks the record as “Added” (if you have a field for tracking).Setup Instructions
1. Replace “Your Date Field Name” with the actual Date field name in your form.
2. Replace “Event Title” with the name of your event Title field.
3. Replace “Your Calendar Name” with the actual name of your calendar in Apple Calendar.
4. Optional: Create a new Text field named “Added to Calendar” in your form to track which records have already been added.Execution & Automation
• Run this script manually to add existing records.
• If you want it to auto-run when a record is created, use a Trigger Script Field with Tap Forms.Would you like assistance setting up an automatic trigger for new records? 🚀
If you want further assistance, you can use the assistant or wait for the Safe of TF to give you to canonical response.
February 21, 2025 at 3:04 PM #51654
Daniel LeuParticipantThere are a few issues with the ChatGPT proposal: one is that TapForms 5 doesn’t support calling AppleScripts.
Utilities.executeAppleScript(script);
is not supported. The API is documented in https://www.tapforms.com/help-mac/5.3/en/topic/javascript-api.TapForms has an API to support adding events to the calendar:
Utils.addToCalendar()
andUtils.updateCalendarEvent()
. So maybe the proposed code can be adapted to use these functions.I don’t use the calendar integration with TapForms so I don’t know the details how it works. There’s an example in the API documentation.
-
AuthorPosts
You must be logged in to reply to this topic.