We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Why isnt Scheduler populated with appointments from my Mongodb server (using Mongoose)?

Thread ID:

Created:

Updated:

Platform:

Replies:

148981 Nov 10,2019 07:22 PM UTC Nov 11,2019 12:24 PM UTC Angular - EJ 2 2
loading
Tags: Schedule
Youssef Lakdime
Asked On November 10, 2019 07:22 PM UTC

I am building a MEAN-application with Scheduler. Creating appointments and saving them to the mongodb database works flawlessly, hoewever, the schedulers remains empty while there are many appointments in the database. This is in my index.js


app.post("/GetData", (req, res) => {
Event.find({}, function(err, events) {
res.send(events);
});
});

I see in my Network tab in my browsers developer tools that when the Scheduler is loaded, the 'getData returns a '200 OK' with the request
Running the 'GetData' endpoint in postman gives me these documents:

 {
        "_id""5dc835d6wefw835250ab4456",
        "startTime""Tue Nov 12 2019 12:00:00 GMT+0100 (GMT+01:00)",
        "endTime""Tue Nov 12 2019 12:30:00 GMT+0100 (GMT+01:00)",
        "subject""Work",
        "klant""Simon",
        "km"43,
        "business"true,
        "location""Amsterdam",
        "description""test",
        "__v"0
    }

How does it come that I dont see the appointments in the scheduler?

Youssef Lakdime
Replied On November 10, 2019 07:34 PM UTC

private dataManager: DataManager = new DataManager({
url: 'http://localhost:8000/GetData',
crudUrl: 'http://localhost:8000/BatchData',
adaptor: new UrlAdaptor
});

this is what I have as dataManager

Vinitha Devi Murugan [Syncfusion]
Replied On November 11, 2019 12:24 PM UTC

 
Hi Youssef, 
 
Syncfusion Greetings. 
 
We have tested your shared code in which field mapping is incorrect, which is the root cause of the reported issue. We prepared the sample below with the right field mapping, please refer to it. 
 

 
Regards, 
M.Vinitha devi 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon