![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Yes, I understand that I can make a path in a field many ways, and in this case it is even a lot simpler. The issue is how do I connect that text field or calc field data to the picture. When you import a folder of images, there are four pieces of data that can be imported, which include File Name, Image, Image Thumbnail, and Path. But the problem is that the path text that ends up in the imported field appears to be only a reference that can be stored, because changing that path text string does not change the path to the actual image. I have even deleted the path field completely and the image still appears in the image field, telling me that that data is only some reference data. I have even tried changing it and pasting it in the image field as if something was hidden there, and it either didn't paste or have any affect. Denny Denny, This is one I can answer... we do this with images on our server all the time using FMPro 6. It sounds to me like you have a bunch of files on a server in a particular folder, or several different folders? Anyway, you CAN store the file path in a Calc field, in one of many ways. If you have different folders for different types of files, you'll have to either set up a way for the user to indicate which folder the file will go to, or set up some type of standard so everyone is putting the same type files in the same place. But all you need is a field in the record that holds the file name of the file you're dealing with and then a calc field that builds the path to the file. If you ever need to change the path, all you have to do is change the root string of the calc field. Here's my example.... text field- FileName: report.jpg calc field- FilePath: "http://www.ugaphoto.alumni.uga.edu/news/" & FileName So your final calc field will look like this: http://www.ugaphoto.alumni.uga.edu/news/report.jpg I use this same method to build file paths via the web (above) or to our internal Xserve via afp like this: "afp:123.456.78.9:Photos:Photosfp5:"& FileName If you need to change the root of the path often, or you need several different root folders, you might even consider storing them in a separate database or in a global field. I've got a script that looks at each user's desktop, and if it doesn't find a particular folder on the desktop, it creates the folder, plus 4 subfolders. I then use paths to this folder and it's subfolders as the source and destination folders for any files we're moving to or from the server. So if you're getting files off the server, FMPro pulls them off the server and puts a copy in the downloads folder, and if you've got files you need to put on the server, you stick them in the uploads folder, then FMP knows to look in that folder for a particular file name, and move it to a particular folder on the server. I use the Troi File Plugin for all the file handling. Hope that helps. Rick O¹Quinn |
#3
| |||
| |||
|
|
This is not an answer, just 2 remarks. - a common good practice is to hold the images on a separate folder, which can be shared, and has a file per image such as 'Image001.jpg'. Then in your FM record, in your Multimedia field, you'll record only its 'reference' ie its path to the image folder. - I found that the only way to easily manipulate files from within FileMaker was to use a plugin such as 'Troi File' at 'www.troi.com', which has excellent examples attached. Particularly true for FMP versions less than 6. Remi-Noel "Denny" <denny (AT) yourguess (DOT) de> a écrit dans le message de news: 170620051235460913%denny (AT) yourguess (DOT) de... Yes, I understand that I can make a path in a field many ways, and in this case it is even a lot simpler. The issue is how do I connect that text field or calc field data to the picture. When you import a folder of images, there are four pieces of data that can be imported, which include File Name, Image, Image Thumbnail, and Path. But the problem is that the path text that ends up in the imported field appears to be only a reference that can be stored, because changing that path text string does not change the path to the actual image. I have even deleted the path field completely and the image still appears in the image field, telling me that that data is only some reference data. I have even tried changing it and pasting it in the image field as if something was hidden there, and it either didn't paste or have any affect. Denny Denny, This is one I can answer... we do this with images on our server all the time using FMPro 6. It sounds to me like you have a bunch of files on a server in a particular folder, or several different folders? Anyway, you CAN store the file path in a Calc field, in one of many ways. If you have different folders for different types of files, you'll have to either set up a way for the user to indicate which folder the file will go to, or set up some type of standard so everyone is putting the same type files in the same place. But all you need is a field in the record that holds the file name of the file you're dealing with and then a calc field that builds the path to the file. If you ever need to change the path, all you have to do is change the root string of the calc field. Here's my example.... text field- FileName: report.jpg calc field- FilePath: "http://www.ugaphoto.alumni.uga.edu/news/" & FileName So your final calc field will look like this: http://www.ugaphoto.alumni.uga.edu/news/report.jpg I use this same method to build file paths via the web (above) or to our internal Xserve via afp like this: "afp:123.456.78.9:Photos:Photosfp5:"& FileName If you need to change the root of the path often, or you need several different root folders, you might even consider storing them in a separate database or in a global field. I've got a script that looks at each user's desktop, and if it doesn't find a particular folder on the desktop, it creates the folder, plus 4 subfolders. I then use paths to this folder and it's subfolders as the source and destination folders for any files we're moving to or from the server. So if you're getting files off the server, FMPro pulls them off the server and puts a copy in the downloads folder, and if you've got files you need to put on the server, you stick them in the uploads folder, then FMP knows to look in that folder for a particular file name, and move it to a particular folder on the server. I use the Troi File Plugin for all the file handling. Hope that helps. Rick O¹Quinn |
![]() |
| Thread Tools | |
| Display Modes | |
| |