Steve Blatman Posted May 9, 2014 Share Posted May 9, 2014 I'm constructing a table of seventeen columns of three characters each on raffle tickets. The data in the csv file has each group of three characters horizontally in a cell. The following code takes each cell and turns it into a vertical column of three characters: Position1 = Left(Field("Wk01"), 1); Position2 = Mid(Field("Wk01"), 2, 1); Position3 = Right(Field("Wk01"), 1); return Position1 + '<br>' + Position2 + '<br>' + Position3 + '<br>'; The returned string is interpreted as tagged text. I suspect that, whenever the character is an ampersand, FP assumes it's the first character in an entity, and returns the error (as well as, apparently, placing the ampersand character correctly in the column). In order to get rid of the "incomplete entity definition" errors, I was trying to modify the rule to test whether a particular character was an "&", and to substitute "&" for the "&", but I keep getting syntax errors, so either it's not the solution, or I'm having pilot error writing javascript. Any hints on how to make this work (or, almost as good, confirmation that I'm getting the correct result from FP, despite the errors, and can ignore them)? Thanks, Steve Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted May 9, 2014 Share Posted May 9, 2014 return TaggedTextFromRaw(Position1) + '<br>' + TaggedTextFromRaw(Position2) + '<br>' + TaggedTextFromRaw(Position3) + '<br>'; Or, the whole rule more succinctly as: return Field("Wk01").split("").map(TaggedTextFromRaw).join("<br>"); Quote Link to comment Share on other sites More sharing options...
Steve Blatman Posted May 9, 2014 Author Share Posted May 9, 2014 Dan, Thanks very much for your reply. It's probably version-related--when I try your suggestion, I get a different error: TaggedTextFromRaw is not defined. I'll take a look at the JS references you suggested. Any further advice would also be appreciated. Steve Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted May 9, 2014 Share Posted May 9, 2014 Thanks very much for your reply. It's probably version-related--when I try your suggestion, I get a different error: TaggedTextFromRaw is not defined. Yes, it is a version issue. If you don't specify the version you're using, I'll assume you're using a relatively recent one. Anyway, in whatever older version of FusionPro you're using, you can probably call NormalizeEntities instead. I'll take a look at the JS references you suggested. Any further advice would also be appreciated. My other suggestion probably won't work with the older version of FusionPro you're using either. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.