Joined: 31 Aug 2016
Location: United States
Online Status: Offline
Posts: 2
Topic: Change Text color based on a character in string Posted: 14 Sep 2016 at 8:05am
I'm looking to change the color of text displayed, based on a special character being present. If, in this case a "?" is present in the text string, I'd like the text to be highlighted Red. I've tried various commands in the "display string" settings, however wildcards aren't recognized and I'm having difficulty making this happen. Thanks for any suggestions or guidance!
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 14 Sep 2016 at 11:02am
If you use the formula for the font (Format Field, Font). I believe you can use special characters by recursing it by a \, (i.e., '\?'). Thus you can do something like this
if instring({somefield},'\?') > 0 then crred else crblack
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum