Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

Hi All,

I am trying to make a field that when you select out of a drop down box a item it will open automated in an other field a picture that belongs to that Item. Do I need to do this true a relation database or can I use a script :

Help!! advice needed !!

Neenen

Posted

You can easily do that with a relationship.

Set up a pictures file with two fields: ID and PIC.

ID stores the id for each picture, for example: A,B,C,D,E

PIC (container field) stores the pictures.

Then go back to the main file:

Set up a value list, to be used in the popup with A,B,C,D,E...

Set up a relationship between the popup field and ID in the pictures file:

mainFile::myPopup = pictureFile::ID

Set up a layout with the popup field myPopup and the related field pictureFile::PIC

As the user select an element from the popup (A,B,C,D,E) the related picture appears in the container.

  • Newbies
Posted

Dude,

Thanks for your quick replay, would you be able to helpme just a little more. When reading your txt and help it all goes well up to the point of mainFile::myPopup = pictureFile::ID ... Within relationship I am not able to setup this relation between the picture file and the main one.... I know it could be me...

When you have a moment let me know....

neenen

Posted

See if these files make sense to you - I have adapted them from a previous post.

In the data file have the container field you use as your image display a related container from the images file. That way, the image that has an ID with the same number will be displayed. This is good if your image ever changes, as it will automatically show the new image. I have also included a looked-up field to store the image - this is more durable and won't change with any change in the original image unless you do a relookup. Try pasting a new image into an existing record in the images.fp5 file and then have a look at a record in the data.fp5 file that uses that image - one of these methods will probably suit you better than the other.

Anyway, I hope this helps. I've attached the file.

Cheers, Murray

imagerel.zip

Posted

open the main file

select file->define relationship

as the "open file" dialog opens select the related file with the pictures.

now select the popup field from the main file (on the left) and the ID field in the picture file.

Give also a name to the relationship, let say "picture by ID".

this is how to set up a relationship. Now you just have to put the related field PIC on the layout.

For more information on how to setup relationship and display related fields you can browse the fm online help.

This topic is 7580 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.