One of the easiest ways I have discovered to link photos or files back to a Property record is to use a script that simply looks for a folder based on the address of the property. I have been talking about this concept a lot lately so it bears writing about again. This approach is completely independent of the Photo Module and instead relies on creating a simple structure of folders to house the files. When the user clicks on the Script Button in the Property screen the script finds the folder that matches the address and launches it in Windows Explorer so that the user can easily see the contents of the folder. Using thumbnail views you can quickly see the contents of photos, PDFs, Word files or whatever. The user can just drag and drop any file they desire into the folder which makes it super easy and quick to populate. The script below has an added feature where it creates the folder for you if it did not previously exist. In this script I use the Street Name followed by the Street Number to name the folders but you could use other Property fields instead. This naming scheme is easy to maintain though and has the big advantage of making sense outside of ZonePro as well. This script uses the "Base" Module, the "Property" Screen and the "Left" Action.
myfolder = "C:\Photos\" + trim(street)+" "+trim(st_nr)
if directory(myfolder)
shellexecute(0,"open",myfolder,"","",1)
else
mkdir (myfolder)
shellexecute(0,"open",myfolder,"","",1)
endif
This script shows the base location as "C:\Photos\" but in most cases this would refer to a location on a shared server. There is a Training Video from last year that shows how this works with a simpler version of the script.
Showing posts with label photo. Show all posts
Showing posts with label photo. Show all posts
3/17/2011
Cover Photo for Windows Interface (ZP 32 or ZP SQL)
A while back I added a feature for ZP SQL customers where they could easily attach a "cover" photo to any property that would be viewed as part of the Staff web site when that property was viewed. Working with a customer today I explained that that same concept could be brought to the Windows interface for either ZP 32 or ZP SQL. The basic idea is that you have one photo you consider to be the main photo for a given property. I'm calling this photo the cover shot. You can store and display that photo easily in ZonePro using a script. This technique does not even require the Photo Module. Basically you just pick a location to store all such photos. A place on the server is best in a networked environment. Then you save the photos using an agreed upon naming scheme. For this script I am naming the photos after the property ID. Now I can easily create a generic script that will check my folder for the existence of such a photo for any given property and launch my default photo viewer for Windows. I added this script to the left-click action of the Script button on the Property Screen so the setup is "Base" for the Module, "Property" for the Screen and "Left" for the Action:
myfile = [c:\photo\]+property.prop_id + [.jpg]
if file(myfile)
shellexecute(0,"open",myfile,"","",1)
else
wait window "Cannot Find Photo " + myfile nowait
endif
myfile = [c:\photo\]+property.prop_id + [.jpg]
if file(myfile)
shellexecute(0,"open",myfile,"","",1)
else
wait window "Cannot Find Photo " + myfile nowait
endif
4/15/2010
Link Photos for Contractor Database
The City of Whiting wanted to know if they could use the Photo Module to attach image files to records in the Contractor Screen. While that is not possible, I did devise a script that gives some of the same functionality. This script looks in a designated folder to see if there is a subfolder that matches the name of the contractor company. If it finds such a folder it launches the folder in Windows Explorer. The user can then easily see the contents of the folder be they image files, Word documents, or whatever. Using the Windows thumbnail option with such folders makes them even more informative. While this script uses the Company field as the folder name, almost any field in the contractor database could be used as the matching criteria. This script works well with one of the
Script Button options such as "Left" or "Right". It's worth noting that this script would work just as well in the Property Screen as a poor man's substitute for Photo Module. This script uses the "Contractor" Module, the "Contractor" Screen and the "Left" Action.
Script Button options such as "Left" or "Right". It's worth noting that this script would work just as well in the Property Screen as a poor man's substitute for Photo Module. This script uses the "Contractor" Module, the "Contractor" Screen and the "Left" Action.
myfolder = "c:\photos\" + trim(company)
if directory(myfolder)
shellexecute(0,"open",myfolder,"","",1)
else
wait window "Cannot Find Folder" nowait
endif
3/03/2010
Using Picasa for On-line Photo Storage
This is a repeat topic I recently entered in the ZonePro Journal blog. The idea is to use an on-line service such as Picasa for storing photos and then using a script to launch the photos. In this scenario I envision a customer creating a separate on-line photo album for each property. The name you give to the album will then be part of the URL that is used to later launch that page of photos from the ZonePro property screen. Whatever you name the album, you need to store that name in a field in the Property database so you can access it via a script and launch the site. Alternatively you could name each album after the Property ID so you don't have to waste a field, but then the album name would be meaningless outside the context of ZonePro. In my example I created an album in Picasa and named it after the address: LOWELL584. I then stored the value "LOWELL584#" in the User3 field of the Property database. Note the # sign. Picasa adds that when it creates its URLs but it may not be necessary. The rest of the URL is always a constant for my Picasa account. Your account would be different, of course. I'm going to use the User Script button to launch the web page and create a script that checks to make sure a value exists in User3 before attempting to launch the web page. To set up the script I use "Base" for the Module, "Property" for the Screen, and "Left" for the Action:
IF NOT EMPTY(property.user3)
GoURL("http://picasaweb.google.com/zonepro32/"+property.user3)
ENDIF
Subscribe to:
Comments (Atom)