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.

Display multiple images in one calculated container field

Featured Replies

I'm thinking this isn't possible but just in case I thought I'd ask.

 

Let's say I have a record with three fields that are simply flags of 1 or 0. I can display a picture using a calculated container field based on those flags. But what if I want to display multiple pictures in that one field?

 

Example:

f_ninja = 1

f_borg = 0

f_devil = 1

 

 

Result: :ninja::devil:

 

 

Example:

f_ninja = 0

f_borg = 1

f_devil = 1

 

Result: :Borg::devil:

 

Note that this also must be compatible with FM Go, which is why I'm doing this. I want to display icons to convey more data about a record in less space.

I do not know if this is compatible with FM Go, but you could try.

Icons.zip

Daniele's sample is clever as usual, but (likewise) you can achieve your goal much less complicated by using a proper data model.

 

See attached example.

Icons_eosMOD.fmp12.zip

Nice, especially the use of the web viewer.
But, are you sure that your sample is less complicated than mine ? :laugh:

are you sure that your sample is less complicated than mine ? :laugh:

 

Not necessarily; but the data model is still better …  :laugh:

I love this kind of stuff, guys!  If Cable has version 13, they could handle it all with Styles and Hide!

 

In this example file, the icons are buttons and you can have them highlight and change color depending upon hover etc. See Inspector > Arrange > Image. Right now, I have the same image in all the style 'states' and then I've saved it in the Enlightened theme.   If you look in Styles, you will see them saved so you can use them as the header title on a layout, or easily add them anywhere you need them and a single css code is used so reusing the icons is very light-weight.  Be sure to optimise the images (remove all the colours NOT in the image - there are software tools for this).

 

In all, I believe Cable has child records with flag fields and he wants user to click a checkbox flag but have the icon show in portals on parent records and on reports instead of the checkbox.  Cable, if you can't open this then either of the other techniques can be modified to meet your specific needs.

 

In this example, if you then switch to the parent record (the other layout), you will see how the icon can display.  You can even have the buttons themselves toggle the checkboxes via script.  Also remember to set in Inspector, Data tab > Hide = not child::f_borg etc. :-)

 

It seems that every time we are given a new tool, we need to re-evaluate EVERYTHING because we will never know where all it might be used effectively.  The fewer calculations, the fewer graph clutter ... I believe, usually the better.

 

ps I agree with you Daniele ... yours is simpler - less clutter :-)  And I don't see how your graph, Oliver, is better at all.  I don't see a child record with flag fields.  I might have missed the boat completely as well ... it won't be the first time so smack me if I missed it!! :-)

IconsV13.fmp12.zip

post-59345-0-78381400-1411182092_thumb.p

post-59345-0-79279600-1411182102_thumb.p

Hey!  I just noticed that this was posted in the FM13 section so Cable might be able to open it!  :-)

Hey!  I just noticed that this was posted in the FM13 section so Cable might be able to open it!  :-)

Hi Cable, if LaRetta is correct, please update your profile. Here is a quick link for you. MY PROFILE

 

There are some key differences between the two releases.

Hi LaRetta

I think that you missed the point. :)
Those icons must slide to the left ! ( this is why I used the List ( ) function )

Well now at least Cable has lots of options, and all our techniques can be used by others.  :-)

  • Author

Oh sweet! I had no idea that container fields could have repetitions. Dunno how I missed that!

 

And yes, the sliding is why I didn't just use the new hide feature. I've used that to great effect, though, with hiding buttons. Really it would be more helpful in some cases to have "show when" instead of "hide when" but hey, it still works.

 

On a final note, I haven't updated my profile yet because my company is technically still on FMP12, but I'm deploying FM13 for my Go solutions. I will update it when we switch.

 

Thanks everyone, I appreciate all the suggestions. :)

  • Author

Update: I had to modify it a bit to make it work since the user isn't making the selections, the selections are coded into the item. FWIW, here's what I ended up using (the fourth value is currently unused but is coming):

 

Icon selections

If( BB = 1; 1 & ¶) &
If(f_OnSpecial = 1;2 & ¶) &
If(f_core = 1;3 & ¶) &
"" &
If(f_new = 1;5 & ¶) &
If ( Left ( ITMGEDSC; 1) = "E"; 6 & ¶) &
If ( Left ( ITMGEDSC; 1) = "P"; 7)

 

Icons

Let(
L = List ( Icon selections ) ;
Case(
Get ( CalculationRepetitionNumber ) ≤ ValueCount ( L ) ;
Data::icons [ GetValue ( L ; Get ( CalculationRepetitionNumber ) ) ]
)
)

 

The end result works on the iPad and is indescribably beautiful! Thanks again! :laugh2:

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.