Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Match Photo with Name


Go to solution Solved by comment,

Recommended Posts

Posted

Hey folks, I've set up a basic portal featuring a few fields and a container. One of these fields is labeled "Artist name". While in browse mode, if you input the name of an artist into this field and hit enter on the keyboard, a matching photo pops up automatically. To begin with, I'm assuming that the name entered (e.g. Michael Jackson) in the field must match the name of the image (Michael Jackson.jpg). Any tips on how to achieve this? Thanks so much.

Posted
36 minutes ago, Christoph said:

While in browse mode, if you input the name of an artist into this field and hit enter on the keyboard, a matching photo pops up automatically.

Huh? Are you describing something that actually happens? Or something that you would want to happen?

 

Posted

This is something that I would want to happen. So, type the artist's name in the "name" field, press enter, and a photo of the artist automatically pops up. Thanks, comment.

Posted

So where is this photo supposed to come from?

If you have a folder of images, you could define the container to be a calculation field and calculate the path to the image by combining the path to folder with the name of the artist. And of course, the calculated name must match the file name exactly (except for character case, IIRC).

BTW, this has nothing to with a portal. A field doesn't know if it's in a portal or not (it could be both) and its contents do not depend on its location on the layout.

 

Posted

The way I have it working now is that once I enter an artist's name into the "name" field, I drag and drop a photo of an artist into the container and I'm done but you're thinking the way I would like it done. Yes, I do have a folder with photos. Let's say the photo folder resides in the same folder as my FM layout, any chance you could provide the calculation and path? I'm still much of a beginner to make sense of it at this point, but still learning. Thanks!

Regarding the portal, I was merely describing my specific layout.

Posted

I added your info, changing the names to represent mine, and still a no-go. I don't yet understand if I have the complete formula that was added to the field using Conditional Formatting. I get so frustrated when I don't understand what seems to be quite simple but I appreciate your help up to now, comment. Hopefully, I'll figure it out. As always, thank you.

Posted

So I finally figured out that I needed to create a Script and not Conditional Formatting. Now when I enter Michael Jackson into the field, the MJ photo pops up. The problem is no matter what name I enter into the name field, MJ's picture pops up. Can anyone explain to to personalize this? I'd really appreciate it. Thanks.

Posted

You don't need a script (and certainly conditional formatting has absolutely nothing to do with this). You need a calculation field with result type of Container.

 

Posted

Thank you, comment, but even with your latest post, I struggle to complete what I'm after. You're a pro, I'm just not :) Cheers!

Posted

Thank you so much, comment. I won't be back until later today but I will respond back :)

Posted

The example file is brilliant, comment. I appreciate you taking the time to put one together and I knew where I went wrong. Towards the bottom of the Specify Calculation window, I had the Calculation result set to "Number" and it should have been "Container". Now all is running beautifully. Thank you so much!

I have one other question if you don't mind. As it stands, only a ".jpg" is allowed as an image. There will be times when I download a ."png" instead of a "jpg", so instead of converting a ".png" file into a ".jpg", can I add something to the calculation so I can use one extension or another when adding the artist's name?

  • Solution
Posted
1 hour ago, Christoph said:

can I add something to the calculation so I can use one extension or another

You can construct the calculation along the lines of:

List ( 
"image:Photos/" & ArtistName & ".jpg" ; 
"image:Photos/" & ArtistName & ".png" 
)

This will create both paths as a return-separated list. The container field will then go over this list and display the first image it can find.

 

  • Plus1 1
Posted

Thank you so much for your continued help, comment. I've been wanting to set this forever and it's finally there. It's quite amazing how simple something is once you know it. Much respect. :)

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.