Associate image with personnel record

I want to add a photo of each employee to a database. The image will not change , so I thought I could use a fixed image object, but that is pasted directly into the form, and is the same regardless of which record is selected. How do I associate an image with each individual record, so that when I scroll to the next record, their photo shows up?

I showed a scheme to do this some time ago. Here is that post:

Thanks Gary, I still need some basic instruction , if you have time.
So in the main personnel database I would add a photo field to each record, that would contain the path that I drag from the file of images? I don’t quite understand where each of these things resides…
Do the images have to be in a pandb database already, or can they just be in a folder in Dropbox?

Thanks again, Chuck

Might I suggest that you do exactly as shown in the mini movie that exists in that post. Do it and see what happens. It should take about 5 minutes to replicate what the movie shows.

Those images are in a folder on the hard drive. Gary is dragging them from a Finder window into a text field that is open for editing. Panorama automatically enters the path to that image into the text field.

OK, I got it.
Thanks for your help, and your patience…

Chuck

Long ago, the user could store an image within the database as a “Flash Art” object. But that data took up space (RAM). Maybe a lot of space relative to the RAM limits of the day.

With today’s GB capacity, that’s not so much of an issue. But still, keeping the photos external is a good idea. If you ever want to replace (or remove) an employee’s photo, it’s easier to just deal with the .jpg file in a photo collection folder.

You don’t need (and probably don’t want) the images embedded in the database itself. So you create a folder and put all the photos (appropriately named - like JackSmith.jpg) in there. As you’ve read, you can create a form object that, as you move from record to record, uses the employee name in the formula that calculates the path name to display the photo.

I have a folder called “Artwork” to store png images needed by various files. It can be on any hard drive available on your network. If you put a folder named “Employees” in the Artwork Folder with a photo of each employee named with their Employee ID as entered in that field, an Image Display object in your Employee File record form would use the equation “Server HD:Artwork:Employees:”+ «Employee ID»". This technique works with any file that has images for each record, like product photos.

Greg’s formula is using the old format for file locations, as was used in older versions of MacOS and Panorama 1-6. If you are new to Panorama you may not be familiar with this format (which is called an HFS path), but you can also use the modern UNIX format that is now used by macOS, for example:

"~/Artwork/Employees/"+«Employee ID»

The example above is for a folder in your user’s folder. For the exact example used by Greg, using a folder on an external drive, the UNIX path would be:

"/Volumes/Server HD/Artwork/Employees/"+«Employee ID»

For more information about modern UNIX paths vs. older HFS paths, see this help page:

I have hundreds of HFSD pathnames in both image objects and procedure statements. Do I have to change all of them for PanX to work in the future?

No. Both styles of path will work. Jim’s post was for the benefit of new users, who might not be familiar with the old style. He was showing them how they could do the same thing you were doing, using the UNIX style paths they were more familiar with.

1 Like

I nice feature to add to your employee file is a report template to print business cards. In your Artwork Folder, put a png image of your company logo. Add an image object with the pathname to the logo on the report template along with text displays for name, telephone, email and anything else. You can then immediately print 10 cards on standard business card paper and give it to the new employee. Likewise, you can do a template for photo ID badges. Write a procedure that asks for the employee name, then selects that record and prints using the template form.