Link to home
Start Free TrialLog in
Avatar of fayeb
fayeb

asked on

Notes Web

I have an appointment system which users can enter an appointment via the web.  I want to be able to limit the appointments to 7 appointments in the morning and 7 in the afternoon.  If a user tries to enter an appointment for an afternoon where there is already more than 7 appointments or if there is already an appointment at that time, I want to display a message to the user to select another time or date.  What is the best way to do this?
Avatar of AndrewJayPollack
AndrewJayPollack

code in the webquerysave() should lookup to a view that lists the appointments, then just process through, make a descision and return to the submitted appointment or a success document.
Avatar of fayeb

ASKER

What do should I use to code this?
lotus designer, using lotuscript.  If this isn't something you've done before, several of us are capable of doing it, but most would charge you as a consultant to do so.
Avatar of fayeb

ASKER

I can do the lookup I just need to know how I would send the message back to user if there is a problem
ASKER CERTIFIED SOLUTION
Avatar of AndrewJayPollack
AndrewJayPollack

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fayeb

ASKER

Can this be done using javascript?
yes, but I don't speak javascript well.  it would be a webquerysave agent just the same, but in javascript.  Only the syntax would change.
Avatar of fayeb

ASKER

I have been asked to show a solution in Javascript which is why I increased the points.  Can any one help with this?

Thanks
Avatar of Zvonko
Hello fayeb,

this can not be done by JavaScript because JavaScript is browser client side. For JavaScript it is not possible to check anything on Domino side. All data have to be provided in advance to browse so that JavaScript can act on this data. But your question does not look as all appointment data are available in the browser.

So what do you like to do in JavaScript?

My proposal would be to let WebQuerySave agent do the lookup on Domino and abort the appointment saving. Additionally can your WQS agent set the value of a ErrorMessage field to be redisplayed on the web page. The only part for JavaScript would be to look for this field at onLoad event of the page and produce some popup alert. This is something I like to do to emphasize the alert message.

Is this something for you?

Avatar of fayeb

ASKER

Zvonko,

This is exactly what I want to do.  I just needed to establish that this could/couldn't be done using javascript.  A webQuerySave agent will be fine.