Jump to content

Recommended Posts

I'm creating an appointment request form but I've run into a problem I can't seem to figure out.

I'm trying to figure out how to filter a dropdown/picklist based on multiple criteria.

Criteria # 1 Office location. - Client selects an office location first, so I used it as the parent field of my cascading dropdown

Criteria # 2 Is the date of the requested appointment (Date_Requested) the current date or date in the future

Criteria # 3 If the date of the requested appointment is the current date, filter by appointment slots greater than 2 hours.

The dropdown list is another table in my system which contains the following fields.

Office_Location

Timeslot (ie. 8 am-9 am)

Appt_Hour (this is the hour of the time slot, ie. 8 am - 9 am shows as 08)

Current (this is a y/n field)

 

Basically what I need to happen, is that when a user selects the facility and the requested date of appointment,

*if the requested date is after today, they will be shown all appointment slots for that facility that are marked "N" in the Current field

*if the requested date if for the current date, it will show only appointment slots that are marked "Y" in the current field and who are greater than 2 hours in the future. ie. if they request an appointment at 10:30 for the same day, the available appointment slots are 1pm-2pm, 2pm-3pm, etc.

 

Any assistance would be greatly appreciated.

Thank you

Link to post
Share on other sites

It should work if you separate your search and report in two pages, and then in the search page have a code to send parameter value to pre-defined report.

 

<script>
 function f_cal(){

var rdate = document.getElementById("cbParamVirtual2").value;
if (rdate > '[@cbTimestamp*]'){
document.getElementById("cbParamVirtual2").value = "N";

} else if (rdate < '[@cbTimestamp*]'){
document.getElementById("cbParamVirtual3").value = "Y";
}}
document.getElementById('Submit').onmouseover =f_cal;
</script>

Virtual 2 is Date and Virtual 3 is hidden and holding the value to pass over to the report.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...