Jump to content

Identifying a specfic record to copy to


This topic is 3100 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I am sitting on a Contact record, when I press a button I execute a Go To Layout, Image Gallery.

The Image Gallery layout, show a list of images, when I select one of the images it is placed in a container field, Image_Gallery::Image_Data, on the same Image Gallery layout.

I would like to run another script from the Image Gallery layout, that would copy the Image_Data contents on the Image_Gallery layout to a container field called Contact::Photo_Image, which is on the original calling Contact record.

I was going to use a Set Field but don't know how to tell the Set Field which Contact record to copy to. There is no relationship between the Contact record and the Image Gallery, the Image Gallery is just a display of all images. Also the Contact::Photo_Image container field has 20 repetitions, is it possible to specify which repetition to copy it to?

Probably when I can figure out how to identify the calling Contact record, I will by pass the initial copy and copy directly to the Contact record.

Link to comment
Share on other sites

Using copy in scripting should generally be avoided.

I think you need to step back and describe your data and your data structure. In Contacts, do you have a field for ContactID?

What is the nature of the image gallery? This is strictly person-images? Or a more general image collection? 

If these are person images and you are trying to match a person to their image, you may want to have an ImageID field in Contacts.

Or, you may want to create a join table between Contacts and Images.

Link to comment
Share on other sites

The images are images of paintings. I am putting images in the contacts records, list of prospects, that they are interested in purchasing, so there is no pre determined relationship. Associating the images with the contact would allow me to remember what paintings they are interested in and allow me to send them an email with the image as necessary.

Link to comment
Share on other sites

I'm not sure how that would be implemented, currently the 20 containers on the Contact layout are on a siide control, the size of each image is  150pt x 115pt. If I were to do the join table wouldn't I need a new record for each image, as in a portal?

Link to comment
Share on other sites

A new record in the join table; yes. Containing the ContactID; and ImageID. As it is right now, you propose copying a lot of images, thus greatly expanding the size of the file for no reason.

With a join table, there would be a record for each contact-picture relationship. Once you grasp the idea of the join table, you will find a LOT of advantages, and you begin taking advantage of the basic features and benefits of relational design.

You do not need to hardwire the count of related pictures. Currently you say you have a hardwired value of 20. With a join table, you just create as many or as few join records as indicated by the client's interests. You do not have to duplicate any image records. A join record might have a comment field or note field, where you describe the client's interest or reaction to the painting, for instance.

Looks like it might be a good idea also to update your profile. Your profile say you're using version 12, but slide controls were introduced in version 13.

Edited by BruceR
clarify join table fields
Link to comment
Share on other sites

I think I get the idea of the join table, where I'm confused is how the images would be displayed on the Contact layout without using a portal. Wouldn't they have to be in a portal? I would like the format for the images on the layout to be as shown, horizontal across layout, is this doable with a join table?

ImageExample.thumb.png.d51afac21dacc0485

Yes, I am using FM 13, I've updated my profile. Thanks for the help.

Edited by laguna92651
Link to comment
Share on other sites

I'm confused by your request. You said the images were in a slide control but that isn't what you show here.

Though there is not a native, horizontal portal format, nevertheless, you can display portal records horizontally.

It would be great if we could easily and reliable point to Comment's excellent example file; but currently the example-link process is broken. Being worked on, but frustrating for all concerned.

As describe by Comment, the trick to making a "horizontal" portal is to display horizontally a series of one-row vertical portals, and designate a different starting row number for each one. 

Or - stop fighting the native FileMaker feature set and just accept it and use a vertical portal.

HorizontalPortal11_modBFR.fp7.zip

Edited by BruceR
Link to comment
Share on other sites

This topic is 3100 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.