getServiceAvailability( ) Bug

I have a form that people can book a service with and based on the date the person selects, it gets the availability for that day and puts the times into a dropdown. I have had no issues with it until today. The getServiceAvailability( ) function is returning _id for the slots that are over 400 characters long so the dropdown for the times is throwing an error.

This is one of the slots it sent back -

'\"_id\":\"4XH3LWgKG5txVlW2EDckWeLceXMrFoQG3X11PHA2hEDYPR3Cl1JRNFk507kagSf99Dv2FULfYVJgWHreW9opGzc8VPLUS0o8G4lF28of9YFBM9Jysi1koJ5ylIMTmGkeagyRQG24qdrJzMA9VVeuMKhhQCGlatYrRcuT9n4EDY40Wd1oJbZQJ0pGL20qMYDjJXewBD4At87XcM6lIfbczAWq3NFKOsyBHd6r9liyHcesAWc2PNgNXtFTQpHRObNzi0jJgCNfcqyO8c3kinbEBc1XwnPo7WZ0Oga5IfqCzoWGnIPL0UyBMZ0q5JYLEiJwmE7w3e5JG0qP3OLwt6D8X9ZTU64rW3bJ6Z7DdLf8ZD0pkFESNpi6XBfkCrck0swJ3V2Yr3sV4xNPHz0EfilworraTaUH6DFmbolyv\",\"startDateTime\":\"2019-11-11T15:00:00.000Z\",\"endDateTime\":\"2019-11-11T15:45:00.000Z\",\"serviceId\":\"a5fcc23f-cb8a-4e66-994a-891ba60b50ab\",\"capacity\":1,\"remainingSpots\":1,\"staffMemberId\":\"287dd4be-27cf-4f59-905d-feb68b2d51f7\",\"bookable\":true,\"constraints\":{\"bookableUntil\":\"2019-11-11T15:00:00.000Z\"}}" 

Notice how long the id is.

This is the error I am getting when I try to set the times on the dropdown -

Wix code SDK error: The value parameter of item at index 0 that is passed to the options method cannot be set to the value “4XH3LWgKG5txVlW2EDckWeLceXMrFoQG3X11PHA2hEDYPR3Cl1JRNFk507kagSf99Dv2FULfYVJgWHreW9opGzc8VPLUS0o8G4lF28of9YFBM9Jysi1koJ5ylIMTmGkeagyRQG24qdrJzMA9VVeuMKhhQCGlatYrRcuT9n4EDY40Wd1oJbZQJ0pGL20qMYDjJXewBD4At87XcM6lIfbczAWq3NFKOsyBHd6r9liyHcesAWc2PNgNXtFTQpHRObNzi0jJgCNfcqyO8c3kinbEBc1XwnPo7WZ0Oga5IfqCzoWGnIPL0UyBMZ0q5JYLEiJwmE7w3e5JG0qP3OLwt6D8X9ZTU64rW3bJ6Z7DdLf8ZD0pkFESNpi6XBfkCrck0swJ3V2Yr3sV4xNPHz0EfilworraTaUH6DFmbolyv” because its length exceeds 400.

This is not something I can really fix. Not sure why the ids are all of a sudden so long.
#bug #bookings

Yeah indeed. If I were you I would contact support to inform them of the issue directly. :slight_smile:

Thanks for the report!