Enable end users to create new schedule objects on demand via drag to create. Drag to create allows you to initialize a new schedule object on a particular row, at a "dragged from" and "dragged to" start and end timestamp.
In order to configure the drag to create, you must provide a Create Action Type
. On drag and drop of a puck, the widget will call this action.
In this example below, we will also refer to the schedule layer as of object type A
.
In Ontology Manager, navigate to Object type A
and create a Create Action Type
. This action type should have the following parameters:
Start Timestamp
propertyEnd Timestamp
propertyforeign key
propertyStart Timestamp
, End Timestamp
, and foreign key
will create an object of object type A
with those values.Now, in Workshop, navigate to Scheduling Gantt Config > Schedule Layer > Enable Interactions.
Under Drag to Create Action, select the action type you configured.
Under the action type you just inputted, choose Select parameter to configure and select the start timestamp, end timestamp, and foreign key parameters. You should now see these three parameters listed in the configuration. We will now select scheduling Gantt variables to pre-fill these parameter values.
Once set up, Shift + Drag
on a given row from a start and end time. This will trigger a popup of your drag to create action form. Upon submission, a new schedule object will be created for the specified row, incorporating the start and end timestamps from the "dragged from" and "dragged to" actions.