I'm still a bit confused as to what the desired end result is.  Are you
saying that the first line always has to have the same level of
indentation in every record, and that subsequent lines should have
lesser indents?  Like this:

                    email
                  phone
                address1
              address2
            address3
          fax

And then in another record:

                    phone
                  address1
                fax

Is that what you're trying to do?  Or do you want the last line to
always be flush left and the previous lines to be indented, like this:

          email
        phone
      address1
    address2
  address3
fax

And then in another record:

    phone
  address1
fax

Either way, the amount of code in the rule can be greatly reduced.  Any
time you have basically the same few lines of code over and over again,
you can refactor it to make it more succinct and manageable.

I don't have your job or a data file with those same fields and rules,
but I created this rule for the Cell Phone Tutorial:

  var indent = 0;
  
  function Repeat(s, n)
  {
    var out = "";
    for (var i = 0; i < n; i++)
      out += s;

    return out;
  }
  
  function IndentedLine(content)
  {
    if (!content)
      return "";

    return Repeat("<t>", indent++) +
       NormalizeEntities(content) + "<br>\n";
  }

  function IndentedFieldLines()
  {
    var s = "";
    for (var i = 0; i < arguments.length; i++)
      s += IndentedLine(Field(arguments[i]));
    return s;
  }

  return IndentedFieldLines("FName", "LName", "AccountNo",
                "Add1", "Add2", "City", "State", "Zip");

You can see how this can more easily be extended to modify the field
names without having to rewrite multiple lines of code.  This isn't
exactly what you're trying to do, but I need more clarification about
what that is.

Dan


+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
FusionPro 5.0 Now Available!


Variable text on a curve and soft drop-shadows for variable text


LIMITED TIME upgrade offer of $299 per license for current customers:
http://fusionpro.printable.com/store/upgrade

New licenses available for $599 each at:
http://fusionpro.printable.com/store/

All FusionPro 5.0 customers to receive FusionPro 5.1 with
Adobe Acrobat 8 and InDesign CS3 support when released for FREE.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
--
Users of FusionPro Desktop have unlimited free email support. Contact Printable 
Support at [EMAIL PROTECTED]
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm

--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--


--
Note:  All e-mail sent to or from this address will be received or otherwise 
recorded by the e-mail recipients of this forum. It is subject to archival, 
monitoring or review by, and/or disclosure to someone other than the recipient. 
Our privacy policy is posted on www.printplanet.com
--

Reply via email to