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

Display multiple images in one calculated container field


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

Recommended Posts

Posted

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.

Posted

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

 

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

Posted

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

Posted

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.

Posted

Hi LaRetta

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

Posted

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

Posted

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:

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