Will54 Posted March 2, 2004 Posted March 2, 2004 I'm a rookie to FileMaker using version 4.1. I would like to add several images to a collection record. At present I can only add one. I've seen other collection programs using a scroll bar so one could import several images. Does anyone know how I can do this. Remember I'm new and need your response in English. Thanks Will54
stanley Posted March 2, 2004 Posted March 2, 2004 Will: The container field can only contain one image. However, if you want to have a number of images appear in one box, with a scroll bar, you could create a portal, put a container field within it, and then you can scroll through the images. In this case, you would have to consider creating a related file, which would have (at least) these four fields: 1. Serial_Number (number, auto-enter) 2. Image (container) 3. Referring_Record_ID (number) 4. Image_Name (text) In your current database, make sure you have an auto-entered Serial_Number for each record. Create a relationship called New_Relationship to this new database with the relation being Old_Database:Serial_Number::New_Database:Referring_Record_ID. To add an image to your database, you'd create a script which would copy the Serial_Number from your current database, then call a script in the new related database. This script would create a new record, paste the Serial_Number into the Referring_Record_ID field, then pause to allow you to enter an image name and put the image into the container field. Now, when creating your portal, tell it to show only one row, and check off "Show Scroll Bar." Make the box the size you want the image to be, then put a container field into it, and size it to be just within the box (allowing room for the scroll bar.) This container field will be the New_Relationship:Image field. Enter a couple of images, and there you are, scrolling images. If that's too complex, post a reply, and I'll lay it out step-by-step for you. -Stanley
stanley Posted March 2, 2004 Posted March 2, 2004 By the way, the portal goes in your original database... -Stanley
Will54 Posted March 3, 2004 Author Posted March 3, 2004 Stanley, Thanks for helping. If its not to much trouble could you show me how to do it step by step. Thanks, Will
stanley Posted March 3, 2004 Posted March 3, 2004 Will: First off, you're using version 4.1, and I can't remember what worked well (and didn't) in that version, so let me know if there are things I suggest that you can't see - it might be that I'm suggesting features that do not exist at all in 4.1 (I am working in 5.5 for this example) So, for the step-by-step: 1. Create your images file. a) Create a new file (File-->New Database) called "Images". Save it next to your existing database file. Define the following fields: 1. "Serial_Number" (number, auto-enter serial number, prohibit modification of value) 2. "Image" (container) 3. "Referring_Record_ID" (number) 4. "Image_Name" (text) c) Arrange them however you like. d) Create the script we will call later from your existing database: 1. Open ScriptMaker 2. Create a new script called "Create Related Image" 3. The script steps are: New Record/Request (this will create a new record) Paste (check off "Select Entire Contents" and select the "Referring_Record_ID" field) Pause/Resume Script (you don't need to specify anything here.) 2. Open your existing database. If you do not have it set to automatically create a serial number for each record, we should do that now. If you have some other unique field already, we'd do this a bit differently. Let me know if that's the case. a) Open your existing database. Define the following field: 1. "Serial_Number" (number, auto-enter serial number, prohibit modification of value) c) Create a relationship to the new database: 1. File-->Define Relationships... 2. Click "new" 3. Select your new "Images" database file as the file to relate to. 4. Name the relationship "Images Relationship" 5. In the left box, select your new "Serial_Number" field. 6. In the right box, select the "Referring_Record_ID" field. 7. Click "Done." d) Create the portal to view your images in: 1. In Layout mode, click on the portal tool (the box that's missing part of it's sides.) 2. In the layout, drag a box a bit larger than the image you want to see. 3. When you let go of the mouse button, a dialogue box pops up. i. Choose Records From: "Images Relationship" ii. Show "1" Row iii. Check off "Show Vertical Scroll Bar". iv. Click "Done" e) Drag the field tool into the portal, and let go; a dialogue box pops up. i. in the pop-up menu, pick "Images Relationship" ii. in the list, select "Image" iii. uncheck "Create Field Label" iv. Click "OK" f) Resize the "Image" container to fit within the portal box. 3. Create the script you'll activate when you want to add an image. a) Open ScriptMaker (still in your existing database) Create a new script called "Add an Image" c) The script will have the follwing steps: 1. Copy ("Serial_Number") 2. Perform Script (in the dialog box, find your "Images" database, select it, and select your "Create Related Images" script. 3. Refresh Window (bring to front) 4. Click "Done" If you want, you can create a button in your layout to activate this script, or just select it from the ScriptMaker menu when you want to use it. Now, when you want to add an image to a record, start the script "Add an Image", and it will take you to your related file, where you can add the image. Hit "enter" (or push "Continue" in the status bar) to resume the script. When you get back to the original database, the image should be in the portal! Let me know how it goes. I've been on the phone while typing this, so I hope I haven't missed anything. -Stanley
stanley Posted March 3, 2004 Posted March 3, 2004 Will: I noticed that my post was stripped of all of its tabs; I hope you can still read it. -Stanley
Will54 Posted March 4, 2004 Author Posted March 4, 2004 Stanley, I got as far as #2 perform Script (in dialog box, find your "images" database.......) (near the bottom). In the specify dialog box there is no Image databasse to select. I had no problem completing the previous steps. Any suggestions? Will
stanley Posted March 4, 2004 Posted March 4, 2004 Will: Right, my mistake, I jumped ahead a bit. The dialog box will show the scripts in the current database, with the addition of "External Script..." at the top. Select that, and then a dialog box opens, and you can navigate to the Images database that you've already created. -Stanley
Will54 Posted March 4, 2004 Author Posted March 4, 2004 Stanley; When I navigate to my image files, the files are there but no images. When I change "files of type" from filemaker files (*.FP3,*FM) to all files, my images are listed. Yet when I try to open one I get a warning, the image was not created by filemaker or it was severly damaged and cannot be opened. Will
stanley Posted March 4, 2004 Posted March 4, 2004 Will: All you want at that point is the Image database itself - you're creating the method by which you'll be able to see from one database into another. The images will get entered into your Images database later. So when that dialog box opens, just pick the "Images" database file; it will then allow you to pick the script within it. Then pick up where you left off; it'll all become clear once you've finished. I hope. If not, keep on coming back. -Stanley
Will54 Posted March 4, 2004 Author Posted March 4, 2004 Stanley; I'm getting closer! The only way I can see the image is if I drag the image field out of the portal. If the field is left in the portal nothing happens. Any thoughts? Will
stanley Posted March 5, 2004 Posted March 5, 2004 Will: Okay, so you've set the whole thing up, and you're able to put the images into the Images database, but then you're not seeing them in the portal? If that's so, go to layout mode and click on the container field in the portal, then go to Format-->Graphic... and select Reduce or Enlarge, and Maintain Original Proportions. If that doesn't do it, make sure that the container field is entirely within the borders of the portal, and make sure that the container field is foremost in the layout... Oh, and after re-reading your post, make sure that the image field is the RELATED field, not a local field. -Stanley
Will54 Posted March 5, 2004 Author Posted March 5, 2004 Stanley, When I click om the image field (out of the portal)to "highlight" it, it works, I get an image. Yet when the image field is in the portal, clicking on the portal, it won't "highlight" itself. I appreciate all your help. Will
stanley Posted March 5, 2004 Posted March 5, 2004 Will: If you want, you could attach what you've got to a posting (both files, compressed as .zip or .sit or whatever) and I'll have a look at it. I won't get to it until the morning, though, as I'm shutting it down for the night. Still, there are plenty of other folks who might have a look and give you a hand. -Stanley
Will54 Posted March 6, 2004 Author Posted March 6, 2004 Stanley Would upgrading to FileMaker 6 make things easier? Will
stanley Posted March 6, 2004 Posted March 6, 2004 Will: I completely forgot, you're on FileMaker 4.1 or somthing, aren't you. An upgrade may indeed be in order. Rumor has it that FileMaker 7 will be announced this coming week, so you may want to hold off for a few days, though. -Stanley
stanley Posted March 6, 2004 Posted March 6, 2004 Will: Try this example - I've put three images in - and see if it works in 4.1. -Stanley
stanley Posted March 6, 2004 Posted March 6, 2004 Hmm. For some reason the attachment didn't attach itself. I'm trying again. Sample for Will.zip
Recommended Posts
This topic is 7568 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now