Jump to content

Multi-Line table header removal


dmp

Recommended Posts

Hi there,

Back again with more multi-line ?'s :)

 

 

1. When using the multi-line wizard, it puts in the field name above the data. How can I remove that? I just want the data, no header.

I'm guessing convert to Javascript and change something, but I don't know what is pulling the header name:


// Rule converted from XML Template "Multi-Line_NAME":
// Choose the following values:
// Begin XML Template selections //
var Field1 = "Member Information"; // "Field for column 1" (Required): FieldList
var Field2 = ""; // "Field for column 2 (optional)": FieldList
var Field3 = ""; // "Field for column 3 (optional)": FieldList
var Field4 = ""; // "Field for column 4 (optional)": FieldList
var Field5 = ""; // "Field for column 5 (optional)": FieldList
var Field6 = ""; // "Field for column 6 (optional)": FieldList
// End XML Template selections //

var fields = [Field1, Field2, Field3, Field4, Field5, Field6].filter(String);

var XDF = FusionPro.GetMultiLineRecords();
var result = [];
for (var r = 0; r <= XDF.recordCount; r++)
{
   var values = [];
   //for (var c = 0; c < XDF.fieldCount; c++)
   //    values.push(XDF.GetFieldValue(r, c));
   for (var f in fields)
       values.push(XDF.GetFieldValue(r, fields[f]));    

   result.push(values.join("\t"));
}
return result.join(Chr(13));

2. I only want sub records to populate (if any) and not the first one of the multi-line record. what would I change to make that happen?

 

 

3. I suppose I should also ask if there's a simple way to just call out a specific iteration of multi-lines like: 2nd line, 3rd line, 4th, 5th etc... of a multi-line record so I could manipulate it that way.

 

 

Thanks for your help!

Edited by dmp
added #3
Link to comment
Share on other sites

1. When using the multi-line wizard, it puts in the field name above the data. How can I remove that? I just want the data, no header.

Change:

for (var r = 0;

to:

for (var r = 1;

 

Record "zero" is the header row.

 

2. I only want sub records to populate (if any) and not the first one of the multi-line record. what would I change to make that happen?

Change it to:

for (var r = 2;

3. I suppose I should also ask if there's a simple way to just call out a specific iteration of multi-lines like: 2nd line, 3rd line, 4th, 5th etc... of a multi-line record so I could manipulate it that way.

Sure, in a call like this:

XDF.GetFieldValue(r, c)

You can set "r" to whatever row/sub-record in the multi-line data you want.

Edited by Dan Korn
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...