OK, so I created a Service and succesfully received the request url and sent back a list of courses that still had some availability. All Good - in fact easy peasy. Sample return below (sorry to anyone wanting to learn to glide - courses are full)
{
"response": [
{
"DurationDays": 5,
"PlacesAvailable": 0,
"CourseDate": "Mon, Sep 12, 2022",
"PlacesOnCourse": 6,
"CourseNumber": 8,
"WebSubject": "Public Course (double)"}
,
{
"DurationDays": 5,
"PlacesAvailable": 0,
"CourseDate": "Mon, Aug 8, 2022",
"PlacesOnCourse": 3,
"CourseNumber": 6,
"WebSubject": "Public Course"}
, ...........
So Now I want to allow a website visitor to book a place. I've got as far as creating the service, have a process that does a find supposdly based on an incoming url parameter - but I can't for the life of me get the syntax right. In the log it keeps finding all the courses (even though it returns only one)
So my code is FIND Courses WHERE Courses.CourseID=Courses.CourseID and I've tried ?Courses.CourseID, ?CourseID, ?Parameter and the URL is
http://localhost:8080/AwareIM/REST/XXXX/CourseBook?CourseID=3
Logviewer shows me that 8 items are being found so CourseID=3 is not being picked up and fed into the FIND in the process. The rest of the process works as I do get a single return. So I'm stumped. How do you construct the FIND to receive the url input?
<WebCourses>
<DurationDays/>
<PlacesAvailable/>
<CourseDate/>
<PlacesOnCourse/>
<CourseNumber/>
<WebSubject>Booked</WebSubject>
</WebCourses>