Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create an event by dragging and save it

Let a dispatcher draw a time range on the Avonni Calendar and save it as a new Event, with the start and end already filled in from the drag.

A dispatcher sees a free slot on Thursday afternoon and wants to book a boiler inspection there. With New Event Drag, they draw the slot on the calendar, a form opens with the start and end already filled in, and the visit is saved as an Event.

Avonni Calendar timeline for Thursday and Friday, November 19 and 20, 2026, with a blue New event block drawn on Michel Chartrand's row from 2 PM to 4 PM
Drag across a free slot: the New event block follows the pointer until you release it.

Before you start

  • A screen flow with the Avonni Calendar on a Screen element, showing Events. See Calendar 101.

  • A second screen flow that creates the Event. It takes two Date/Time input variables, for example startDateTime and endDateTime, and uses a Create Records element.

  • A Query data source if you want the new event to appear without reloading the page. See Use a Query data source.

Steps

1

Add the New Event Drag interaction

  1. Open the Calendar in the Component Builder and go to the Interactions tab.

  2. Under New Event Drag, add an interaction.

  3. Set Type to Open Flow Dialog and pick your create flow in API Name. The list shows each flow by its label.

Until this interaction exists, users cannot draw new events on the calendar.

Calendar Interactions tab with New Event Drag set to Open Flow Dialog, and its popover with API Name New visit, Input Variables startDateTime and endDateTime, Modal Header New visit, Modal Size Small and On Finish Refresh Query
New Event Drag opens the create flow and passes it the drawn start and end.
2

Pass the drawn range to the flow

In Input Variables, add two rows:

Name
Type
Value

startDateTime

Date/Time

Start Date Time

endDateTime

Date/Time

End Date Time

Start Date Time and End Date Time are the start and end of the range the user drew. In the create flow, use the two variables for StartDateTime and EndDateTime on the new Event.

The resource row is not passed. Let the dispatcher pick the technician (OwnerId) in the create flow.

3

Reload the calendar after the save

In On Finish, add a Refresh Query action. The calendar reloads its events, and the new visit appears in its slot. Refresh Query is only offered with a Query data source.

4

Decide whether past slots are allowed

By default, users can draw events in the past. To stop that, turn on Prevent Past Event Creation at the top of the Interactions tab. See Block past dates and limit working hours.

5

Save and test

Save the screen flow and run it (the drag does nothing in the Component Builder preview). Drag across two hours on Thursday afternoon. The dialog opens with the start and end of that range, and after you save, the new Event appears on the calendar.

New visit dialog with Subject, Technician, Start Nov 19, 2026 2:00 PM and End Nov 19, 2026 4:00 PM
The create flow opens with the start and end of the drawn range already filled in.

To open the standard New Event page instead of a flow, set Type to Navigate, Page Reference Type to Object Page, Object Api Name to Event, Action Name to new, and map StartDateTime and EndDateTime in Prefilled Values to Start Date Time and End Date Time.

Troubleshooting

Nothing happens when I drag on the calendar

Check that a New Event Drag interaction exists, and run the flow: drags are ignored in the Component Builder preview. If Prevent Past Event Creation is on, drags in the past are ignored too.

The event is saved but does not show on the calendar

Add Refresh Query in On Finish. Also check that the new Event matches the data source filters, for example the same owners and date range.

Last updated

Was this helpful?