Jump to content

Steve Blatman

Registered Users - Approved
  • Posts

    14
  • Joined

Posts posted by Steve Blatman

  1. 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

  2. Never mind on that score -- adding one more ... + <'br'>

    at the end of the "return" line solves that one.

     

    When I compose, though, I get "incomplete entity definition" errors. The output, though, looks correct...

     

    I'm looking to see what that error is, but, if you know, it would save me some time.

     

    Thanks for your help today,

    Steve

  3. Thanks for your help--I have one more question....

     

    I ended up with this:

     

    Position1 = Left(Field("fieldname"), 1;

    Position2 = Mid(Field("fieldname"), 2, 1;

    Position3 = Right(Field("fieldname"), 1;

     

    return Position1 + '<br>' + Position2 + '<br>' +Position3;

     

     

    However, if the character in Postion3 is an ampersand, I get a blank space in my output instead of the ampersand. Any idea why, and and suggestions for what to do about it?

     

    TIA,

    Steve

  4. My customer's data has many 3-character fields, each of which I need to print as three characters stacked over one another. I tried just narrowing the text box so the field would wrap to three lines, but some of the characters, like "#", won't separate from the adjacent character--FP won't wrap between them. I need either javascript code to add carriage returns between the characters in a field, or some way of telling FP not to keep any pairs of characters together. (I'd prefer the former). The fields are always three characters, but the characters could be anything that prints (not just letters and numbers).

     

    TIA,

    Steve

×
×
  • Create New...