Perspective Equipment Schedule + save data event

Good evening,

I’m using the Perspective Equipment Schedule component, I noticed that once the event is created if I change session the event is lost.
How can I solve it?
Do I need to create a database? if you could show me an example ?

Thank you

Hi @gerardopignatiello96, yes, if you want the schedule events to be persistent, you’d need to use a database, dataset tag, or some other structure.

You can start with the object that gets created when you add an event to the schedule by default to get a sample database table:

Something like

CREATE TABLE dbo.ScheduleEvent (
    ScheduleEventID INT PRIMARY KEY IDENTITY (1, 1),
    Label NVARCHAR (50) NOT NULL,
    EndDate DATETIME,
    LeadTime INT,
    PercentDone INT,
    BackgroundColor NVARCHAR(50)

This is a very barebones structure which won’t be very useful in a production setting, but it will work for this component.

Then, you can change the on*Event actions to use this table and insert the added event into the database table we created above instead of into the schedule’s scheduleEvents prop. Then on the scheduledEvents property, bind a query to select all of the events in your database table.

1 Like

Thanks a lot