Changing a reservation's color if there's a note on it

Top  Previous  Next

DISCLAIMER: This article involves Advanced Customizations, which can be technically challenging to get working and is not part of standard support.  This is programming and must be done precisely or the results can be unpredictable.  This information is provided as a service for those who have the technical skills to work through it -- we cannot help you solve any issues with getting it working.  For more information about Advanced Customizations, see the full documentation:

https://campgroundmaster.com/help/overview32.html

 

 

We've shown before how to add color-coding for specific reservation types.  There are a lot of other things you could do with color coding, since any expression can be used to define the rules.  This example shows how to change the color if the reservation has a special tag in the Notes field.

 

The majority of the Color Scheme setup would be done the same way as if it's a special reservation type -- except the conditions for the rules would be checking a different field.  Refer to this article for the details of setting up such a color scheme:

http://campgroundmaster.com/news/colorcodingspecialreservati.html

 

The only difference is that in the color rules, the condition expression would not check the Resv:Resv_Type field.  For instance, instead of Resv:Resv_Type = "Weekly", the expression would contain something like this after the "AND":

 

 Resv:Resv_Notes != ""

 

This will make it use that color if there is anything in the Notes field.  To be more specific, lets say that you use a special tag in the Notes, such as "P/D" if they're past-due.  You can use the FindNoCase() function to see if this appears anywhere in the notes, ignoring whether it's upper or lower case:

 

 FindNoCase(Resv:Resv_Notes, "P/D") != 0

 

Remember that this would replace the Resv:Resv_Type = "Weekly" expression in each of the rule definitions -- you probably would still need to have several rules to check for the various status conditions, as described in the original article.

 

 

Getting more sophisticated, you might want to set up a special field for your tag, instead of using the Notes field.  You could use one if the existing Reservation "Attribute" fields (Preferences), perhaps renamed to something like "Past Due".  To use one of these for your purposes, follow these steps:

 

1. Go to Maintenance / Data Field Definitions / Reservation Fields and locate an Attrib_ field that you're not using, and change the Status to "Enabled". Also modify the "Normal Header" and other fields accordingly, e.g. to "Past Due".  Note that you should use one of the yes/no attribute fields, e.g. 20A, 30A, etc.

 

2. Optionally, go to Maintenance / Program Options / Reservations and select that field for one of the available Quick-select Preferences. This will add a checkbox for it on the New Reservation dialog.

 

Note: For any existing reservations that this should apply to, you need to go into Reservation Details for those reservations, then click "Site Preferences", and check the appropriate box to make it show "Must Have".

 

Make a note of that field ID for use in the color scheme rules, and compare it to the text "Must Have" (which is what it will be if the box is checked). For instance if you use the 20A attribute, the expression will be:

 

 Resv:Attrib_20A = "Must Have"

 

Again, that only replaces the Resv:Resv_Type = "Weekly" comparison as shown in the original article -- the reservation status must also be checked in the expressions.

 

 


Page URL https://CampgroundMaster.com/news/changingareservationscolor.html

Campground Master Home