Submitted by lucasd on 2020/09/20 22:58
 I would like to change the font size of items based on the value of a field, via a formula in an auto-assignment rule or a row equation (or via conditional formatting). However, I am not finding a modifiable font size field. Is there a way to do this?
Thanks

Comments

Hi Lucas,
 
Item font is stored in field ItemFont, with this format:
FontName|FontSize|B|I|U|S|, such as: Segoe UI Symbol|14|B|I|U|S|
 
You can use VbScript with the split function to extract font parameters
 
Pierre_Admin
IQ Designer
 

lucasd

2020/09/21 19:14

In reply to by Pierre_Admin

Great, thanks for the tip! I will need to dip my feet into learning VbScript, which is something that's been on my list for a long time...

Pierre_Admin

2020/09/21 20:26

In reply to by lucasd

Checkout the SetFontAttrib function in the System Code tab of the Visual Basic Editor. It will be a good starting point for you
 
Pierre_Admin
IQ Designer
 

lucasd

2020/09/29 10:15

In reply to by Pierre_Admin

Okay, thanks. I will have a look at that soon.
 
In the meantime, without getting into Visual Basic, I have noticed that I can directly input font sizes into the [ItemFont] field by using the syntax, e.g., "|24|" (adding vertical bars on either side of the number). Would there be a way to use a row equation or auto assignment rule that fills the [ItemFont] field with "|" + [MyNumericFieldValue]" + "|"? This would be a way to use a simple formula to edit font size without using Visual Basic. (Of course it would also overwrite any additional font information, such as bold and so forth.) I remember using formulas like this when I was on a Mac and used Tinderbox, but I'm not sure how to mix characters and field values in InfoQube formulas. Anyway, I understand that Visual Basic is, at least for now, the preferred way to solve this, but I'm just curious in the meantime to see if there's a simpler way.
 
Thanks again.

WayneK

2020/09/29 12:53

In reply to by Pierre_Admin

I hope we can continue to get more standard functions simplified for easy use by people who don't code.  I know the scripts are simple for many people but for someone who doesn't use them much, it's always a time-consuming detour trying to do things that, in my opinion, should be readily available in the menu's.
 
Right now I am trying to set the font for a field but can't find a straightforward way to do it.  I can set the color and alignment easily enough.  Why can't there be a font option in the field dialogue and/or column menu?
 
If there is, please point me to it.
 
Thanks,
Wayne