4/15/2010

Violation Warning for Owners

At Huber Heights they have a particular landlord that wants to be notified immediately whenever one of his properties has a violation. We created a script that displays a message whenever that owner's name is involved. This script uses "Zoning" as the Module, "Violations" as the Screen and "Add" as the Action which means it will run when you click on the User Script Button in the Building Screen.

if property.own_lname = "PARK REALTY"
= messagebox("Call Bob Watson at Park Realty about this!", 16, "Notify")
endif

To use this scrip in ZP SQL I would change it slightly:
 
if propnames.own_lname = "PARK REALTY"
= messagebox("Call Bob Watson at Park Realty about this!", 16, "Notify")
endif

This script works fine if you have only a few such landlords to track, but would become unwieldy quickly. Another approach would be to key off a value in the Property database that you fill in to indicate you want a message displayed. You could use the USER4 field for example and the value "NOTIFY" to trigger the script. Your script would then look like this for both ZP 32 and ZP SQL:

if property.user4 = "NOTIFY"
= messagebox("Call owner about this!", 16, "Notify")
endif

This option is really just a variation of the built-in Alert Message feature.