Stack Posted September 21, 2009 Share Posted September 21, 2009 I assume this is probably an easy fix, but I haven't had any luck figuring it out on my own yet... I have a Date variable which I want to appear in small caps, with the first letter of the month appearing as regular caps. I'm easily able to setup a rule using the "Case selection for a name field Rule" that's already built in to FP, however, this is also reducing the size of the year, which I don't want. For example, what I want is "OCTOBER 2004", but what I'm getting is "OCTOBER 2004". Is there any way to fix this? I imagine you can probably create an exception in the bare JS coding, but I haven't yet familiarized myself with JS, so I'm lost. Link to comment Share on other sites More sharing options...
esmith Posted September 21, 2009 Share Posted September 21, 2009 Interestingly, if your data were "2004 October", the wizard rule would return "2004 OCTOBER" but "October 2004" returns "OCTOBER 2004" as you said. If your month and year can be parsed into separate fields, your problem would be solved. Assuming that is not an option and your field contains only month and year (in that order) for all records, you could write the following rule (don't forget to check the box for returning tagged text in the rule dialog box): var Var1_Array = Field("MY FIELD").split(" "); //Replace MY FIELD with name of your data field return "<smallcap>" + Var1_Array[0] + "</smallcap> " + Var1_Array[1]; If that doesn't work, you may need to supply some sample data from your affected field(s) in order to tweak the rule. Link to comment Share on other sites More sharing options...
Dan Korn Posted September 21, 2009 Share Posted September 21, 2009 The solution in this thread should work: http://forums.printable.com/showthread.php?t=170 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.