png1x1 ( hex_string )
Used to set a container field to a 1x1 .png
Be the first to rate this function Log in to vote
Tony White - Show more from this author
Tony White Designs, Inc. http://www.twdesigns.com/ |
Status = "Rec. Partial" ; png1x1 ( "fc9" ) ;
Status = "Rec. All" ; png1x1 ( "ccf" ) ;
Status = "Ordered" ; png1x1 ( "fcc" ) ;
Status = "On Hold" ; png1x1 ( "ff9" ) ;
Status = "Planned" ; png1x1 ( "cff" ) ;
""
)
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Used to set a container field to a 1x1 .png
Here are some colors that we like. Also easy to work with!
http://www.twdesigns.com/resources/documentation/f/filemaker-7-to-11-default-color-palette/
use case: set a container field based on the value of another field, for example...
Status & Status_Color_R, Priority & Priority_Color_R, etc.
Might be used instead of a Conditional Format Fill to provide a DRYer implementation that is more flexible.
Inspired by CF "colors_for_containers ( color_name ; opacity )" ; https://www.briandunning.com/cf/1828
Comments
Tim Anderson, Tim Anderson Group Feb 24, 2021 |
||
Thanks Tony, useful. If I can I would like to suggest that if an empty string is passed as the parameter then the content is cleared. Quick and dirty.. ~result = Case(IsEmpty(hex_string );""; Base64Decode ( ~png1x1_base64enconded ; hex_string & ".png" )) |
||
Tony White, Tony White Designs, Inc. Feb 28, 2021 |
||
Hi Tim, Interesting idea. Added it as v2. In the v1 a blank value seems to fall to the default and clear. That said, an intentional empty value could be handled explicitly at the top of the Case Function, while a missing value could be handled as a default Case/color/PNG TBD. Thanks for the feedback. |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.