Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Identifying a specfic record to copy to

Featured Replies

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.

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.

  • Author

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.

Then you should instead have a join table. The images do not belong in the contact record.

  • Author

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?

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

  • Author

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

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

  • Author

Sorry for the delay, I missed the email that you had responded. I will probably go with the vertical portal as you suggest. The example file also looks very interesting. Thank for your help.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.