Jump 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.

Featured Replies

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.

Solved by comment

Go to solution
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?

 

  • Author

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.

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.

 

  • Author

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.

23 minutes ago, Christoph said:

Let's say the photo folder resides in the same folder as my FM layout

If the folder is in the same folder as your FMP file, then the formula could look something like:

"image:Photos/" & ArtistName & ".jpg"

where "Photos" is the name of the folder and "ArtistName" is the name of the field.
 

Learn more at:
https://help.claris.com/en/pro-help/content/creating-file-paths.html

 

  • Author

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.

  • Author

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.

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.

 

  • Author

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!

See if you can make sense of the attached example.

 

 

example.zip

Edited by comment

  • Author

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

  • Author

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
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.

 

  • Author

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

Important Information

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

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.